[11] Review request : JDK-8195799 : Use System logger instead of platform logger in javafx modules

Kevin Rushforth kevin.rushforth at oracle.com
Fri Mar 23 19:47:15 UTC 2018


mandy chung wrote:
> On 3/23/18 9:34 AM, Ajit Ghaisas wrote:
>> Hi Kevin, Mandy and Daniel,
>>     Please review the changeset that removes dependency on sun.util.logging package from JavaFX code.
>>     Bug :  https://bugs.openjdk.java.net/browse/JDK-8195799
>>     Fix :  http://cr.openjdk.java.net/~aghaisas/fx/8195799/webrev.0/
> buildSrc/addExports
>    FX modules are compiled together and I don't expect these 
> --add-exports are needed.  I suspect it's because of the boot JDK and 
> this is a temporary dance?

Exactly. It is needed for changes that have been added to 
module-info.java and are not in the minimum required boot JDK, so that 
we can build/run apps and tests.

> PlatformLogger.java
>  150     public static synchronized PlatformLogger getLogger(String 
> name) {
> This keeps the weak reference to all PlatformLogger created.  A 
> simplification is to return
>    new PlatformLogger(System.getLogger(name));
> System::getLogger should return the same instance if it has been 
> created.  I also suspect the caller of PlatformLogger::getLogger keeps 
> a strong reference and calls it once.  
> I recalled there were some native methods calling the Java API to set 
> level.  It has been a while back since I looked at it and things 
> miight have changed.  Is there such reference any more?

The ones that you were thinking of are in javafx.media are not calls to 
PlatformLogger at all, but calls to a similarly named convenience class 
in the javafx.media module.

> Other than the above comments, this change looks good.


-- Kevin

> Mandy

More information about the openjfx-dev mailing list