Deadlock between FileHandler and ConsoleHandler when using customized formatter

Daniel Fuchs daniel.fuchs at
Fri Nov 29 16:05:29 UTC 2013

On 11/29/13 4:56 PM, Alan Bateman wrote:
> On 29/11/2013 10:08, Daniel Fuchs wrote:
>> However, removing or just moving the lock around might well introduce new
>> unknown issues - so it will need to be carefully anaIyzed, and I am
>> not sure
>> it can/should be attempted in a minor JDK release.
> Yes, we have to be very careful as the logging code has a history of
> biting the hand of those that try to improve it. For various reasons, it
> seems there is a lot of code that has subtle dependencies on the
> implementation, on the initialization in particular. In any case, you
> are to be applauded for tackling the synchronization issues and it would
> be a good project to re-examine all of this in JDK 9 to see how it would
> be simplified.
> On documenting the locking details in an @implNote (which seems to be
> one of the suggestions here) then we also need to be careful as I think
> we need some flexibility to change some of this going forward.

Yes - that's a two edged sword indeed. We certainly don't want to set
that in stone... On the other hand I empathizes with developers who
struggle to find out what they can - and can't do - when extending
j.u.l APIs...

Anyway, if usage of the 'synchronized' keyword never appears in
the Javadoc I guess that's for good reasons...

Thanks Alan,

-- daniel

> -Alan

More information about the core-libs-dev mailing list