Theoretical data race on java.util.logging.Handler.sealed

Mandy Chung mandy.chung at
Tue Dec 10 17:49:31 UTC 2013

On 12/10/2013 12:48 AM, Alan Bateman wrote:
> On 10/12/2013 04:13, Mandy Chung wrote:
>> On 12/8/2013 11:19 AM, Peter Levart wrote:
>>> :
>>> You're right, doPrivileged() is a more straight-forward approach 
>>> than 'sealed' variable. Since this might only be considered for 
>>> inclusion in JDK9 when lambdas are already a tried technology, how 
>>> do you feel about using them for platform code like logging?
>> I'm in favor of more platform code using lambda when appropriate. 
>> logging is a module separated from the base module in Jigsaw.   I 
>> don't see any issue with that while the only thing is that when we 
>> backport it to 8u, the backport would be different - not an issue 
>> either.
> I'm less sure on this about this (or rather just concerned there might 
> be code paths that lead to recursive initialization issues when 
> linking call sites). I see there are still cases where String.format 
> is used when generating proxy classes and that will trigger the 
> loading of locale-specific service providers. There is also exception 
> handling in the proxy class dumping code that use the PlatformLogger. 
> It might not be an issue with this specific patch as the compiler will 
> (I think) generate the lambda method but just a general worry about 
> anything that might run early in the startup.

It is a good point.  I will have to review the patch in details.  In 
general, I think j.u.logging should only be run after startup which was 
fixed in jdk 7 while we should check if any change went in that since 
then.  Also PlatformLogger might need to be changed and only begin 
forwarding to j.u.logging after startup (need to think about that further).


More information about the core-libs-dev mailing list