(XS) java.logging Level.java minor cleanups

mandy chung mandy.chung at oracle.com
Fri Aug 24 02:20:40 UTC 2018


Do you find the class files containing the bridge methods.

I checked my JDK build and the Level and KnownLevel classes are in
the same nest as I expect.  Level is the nest host of KnownLevel
which can access Level.name and other fields via getfield.
I also skimmed through the class file and doesn't see the bridge
method.

Are you setting Eclipse with JDK 11 with nestmate support?  I don't
know whether Eclipse has also detected the nestmates though.

Mandy

On 8/23/18 3:41 PM, Bernd Eckenfels wrote:
> Hello Mandy,
> 
> the fields Level#name, Level#value and resourceBundleName accessed from 
> KnownLevel inner class are private and therefore an synthetic accessor 
> will be used. Eclipse warns about this.
> 
> But, Looking at it again, it is not only a non-issue with JEP 181 in 
> Java 11, it is also hard to fix for 8u since the Level class is public 
> and so the fields really should stay private. (I gues I was just 
> suprised to see any synthetic accessors in Performance critical JCL classes)
> 
> Gruss
> 
> Bernd
> 
> -- 
> http://bernd.eckenfels.net
> 
> *Von: *mandy chung <mailto:mandy.chung at oracle.com>
> *Gesendet: *Donnerstag, 23. August 2018 22:02
> *An: *Bernd Eckenfels <mailto:ecki at zusammenkunft.net>; Daniel Fuchs 
> <mailto:daniel.fuchs at oracle.com>
> *Cc: *core-libs-dev at openjdk.java.net <mailto:core-libs-dev at openjdk.java.net>
> *Betreff: *Re: (XS) java.logging Level.java minor cleanups
> 
> On 8/23/18 2:49 PM, Bernd Eckenfels wrote:
> 
>  >
> 
>  > Did you had any opinion on the synthetic accessors as well?
> 
> :
> 
>  >> BTW: I get a synthetic Accessor warning on l.name/value, is this
> 
>  >> what  nestmates will resolve – is it worth adjusting the modifiers 
> for>>
> 
> those fields anyway?
> 
> What warning message did you get?
> 
> Mandy
> 


More information about the core-libs-dev mailing list