Review request: 8011380: FX dependency on PlatformLogger broken

Mandy Chung mandy.chung at
Thu Apr 4 04:52:06 UTC 2013

Peter, Laurent,

History and details are described below.

Webrev at:

I add back the getLevel(int), setLevel(int) and isLoggable(int) methods 
but marked deprecated and also revert the static final variables to 
resolve the regression. They can be removed when JavaFX transitions to 
use the Level enums (I'll file one issue for FX to use 
PlatformLogger.Level and one for core-libs to remove the deprecated 
methods).  The performance overhead is likely small since it's direct 
mapping from int to the Level enum that was used in one of your previous 
performance measurement.

Laurent - you have a patch to add isLoggable calls in the awt/swing 
code. Can you check if there is any noticeable performance difference?

I also take the opportunity to reconsider what 
JavaLoggerProxy.getLevel() should return when it's a custom Level. Use 
of logging is expected not to cause any fatal error to the running 
application.  The previous patch throwing IAE needs to be fixed.  I 
propose to return the first Level.intValue() >= the custom level value 
since the level value is used to evaluate if it's loggable.

History and details:
JavaFX 8 has converted to use sun.util.logging.PlatformLogger 
( I was involved in the 
early discussion but wasn't aware of the decision made.  Thanks to Alan 
for catching this regression out before it's integrated to jdk8.  
jfxrt.jar is cobundled with jdk8 during the installer build step.  My 
build doesn't build installer and thus we didn't see this regression.

I ran jdeps on jdk8/lib/ext/jfxrt.jar (windows-i586) that shows 112 
references to PlatformLogger and on jdk7/lib/jfxrt.jar that shows no 
reference to sun.util.logging.

I have a method finder tool (planning to include it in jdk8) to search 
for use of PlatformLogger.getLevel and it did find 2 references from 

JavaFX 8 is going to upgrade to use JDK 8 for JavaFX build 
( soon (currently it's 
built with JDK 7).  As soon as JavaFX code are changed to reference 
PlatformLogger.Level enum instead, we can remove the deprecated methods 
and change the PlatformLogger constants.

JavaFX 2.2.x doesn't use sun.util.logging and so this has no impact to 
it.  In any case, JavaFX 2.2.x only runs either bundled with a 
corresponding JDK 7u release, or as a standalone library for JDK 6 only.


More information about the core-libs-dev mailing list