On 06/17/2013 05:15 PM, Mandy Chung wrote:
Chris,

Thanks for the patch.  It looks fine to me.  I saw that you have pushed
this changeset which is fine.

Thanks for looking at this Mandy, your eyes are welcome here.

As for the background, we leave these deprecated methods and fields in
sun.util.logging.PlatformLogger just  temporarily to allow JavaFX to
migrate and use the PlatformLogger.Level enums [1] which has recently be
fixed.

Yes, I understand this, and the plan makes sense. I just notice these warnings, and decided to clean up the jdk for now.

-Chris.

These deprecated methods/fields will be removed in JDK8:
    JDK-8011638: Remove deprecated methods in
sun.util.logging.PlatformLogger

Mandy
[1] https://javafx-jira.kenai.com/browse/RT-29523

On 6/14/2013 8:00 AM, Chris Hegarty wrote:
There are 623 occurrences, and hence 623 deprecated build warnings, of
PlatformLogger.isLoggable(int) in the jdk source.

PlatformLogger is an internal API, and used in may places in the jdk.
isLoggable(int) has been deprecated in favor of isLoggable(Level).
isLoggable(Level) is slightly more efficient, as it avoids the mapping
of int to Level.

The solution is to simply replace isLoggable(int) with
isLoggable(Level), providing the appropriate Level. Example:

  -          if(logger.isLoggable(PlatformLogger.FINE)) {
  +          if(logger.isLoggable(PlatformLogger.Level.FINE)) {

http://cr.openjdk.java.net/~chegar/platLoggerWarn/webrev/

I haven't yet filed a bug for this, but I plan to push the changes
through TL, rather than splitting the across multiple integration
forests.

Sample warning output:

tl/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java:416:
warning: [deprecation] isLoggable(int) in PlatformLogger has been
deprecated
tl/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java:422:
warning: [deprecation] isLoggable(int) in PlatformLogger has been
deprecated
tl/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java:635:
warning: [deprecation] isLoggable(int) in PlatformLogger has been
deprecated
....

-Chris.






Reply via email to