United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6896068 SunGraphics2D exposes a reference to itself while non fully initialized
JDK-6896068 : SunGraphics2D exposes a reference to itself while non fully initialized

Details
Type:
Bug
Submit Date:
2009-10-28
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2009-11-25
Component:
client-libs
OS:
generic
Sub-Component:
2d
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
OpenJDK6
Fixed Versions:

Related Reports

Sub Tasks

Description
Mario Torre wrote:
> Hello all!
>
> While hacking on Cacio I've found that SunGraphics2D exposes a reference
> to "this" inside the constructor to another class, while initialising a
> field that contains the RederingLoops.
>
> I filed a bug report and proposed a patch for review:
>
> https://bugs.openjdk.java.net/show_bug.cgi?id=100068
>
> The webrew is here:
>
> http://cr.openjdk.java.net/~neugens/100068/webrev.01/
>
> There is not much to say about the rationale for the bug/fix, just that
> the code looks a bit borked to me with those public references (there
> are others around, I think I should fix them all at some point), but the
> real problem is indeed exposing "this" in the constructor.

>

                                    

Comments
EVALUATION

Comment #4 From  Mario Torre   2009-10-30 05:03:35 PDT   (-) [reply] -------

The proposed fix:

http://cr.openjdk.java.net/~neugens/100068/webrev.09/

Has been accepted.

The full discussion that lead to this patch can be followed by reading the
thread on the java2d-dev mailing list:

http://mail.openjdk.java.net/pipermail/2d-dev/2009-October/001053.html
                                     
2009-10-30



Hardware and Software, Engineered to Work Together