Hi,

This is a fix for an old bug which rightfully remarks that
whereas access to 'level' in handler is synchronized,
access to other mutable fields - like 'filter' etc...
is not - which is inconsistent.

<http://cr.openjdk.java.net/~dfuchs/webrev_6823527/webrev.00/>

I have tried to keep the fix simple - simply adding
synchronized to method declarations when it was clear that
there was an inconsistency.

I also looked at the subclasses of j.u.l.Handler

In some places I resorted to using a synchronized block to avoid
calling overridable / external method from within the lock.

The changed methods are simple accessors, and subclasses of
Handler are already full of synchronized methods (e.g.
methods like publish(...) are already synchronized)
so the risk of fixing these simple accessors should be limited.

best regards,

-- daniel

Reply via email to