7192275: Minimize LogManager dependencies on java.beans

Dmitry Samersoff Dmitry.Samersoff at oracle.com
Sat Aug 18 05:56:27 PDT 2012


Alan,

1. 315 - IMHO, it's better to call checkAccess() before null pointer
check. This problem exists in original code as well.

2. This place is not clean for me - env is constant under loop.
is it intentional?

 975                 for (int i = 0; i < count; i++) {
 976                     listener.propertyChange(ev);
 977                 }


Besides that looks good for me.

-Dmitry


On 2012-08-18 14:35, Alan Bateman wrote:
> 
> I need a reviewer for a small change to the LogManager implementation
> that reduces its dependency on the beans classes.
> 
> As background, the LogManager addPropertyChangeListener and
> removePropertyChangeListener result in a toxic dependency on classes in
> the beans package. With modularity coming then I think we will
> eventually get to the point where we need to consider removing these
> methods, that's a discussion for another day. In the mean-time we need
> to minimize the dependency to only the PropertyChangeListener and
> PropertyChangeEvent classes.
> 
> The webrev with the change is here:
>   http://cr.openjdk.java.net/~alanb/7192275/webrev/
> 
> The changes are very simple and just replace the code that was using
> PropertyChangeSupport (a supporting class) with a Map that is used to
> keep track of the registered listeners. One thing I found is that the
> tests in the jdk repository don't provide any coverage for these methods
> so I've used the opportunity to add a simple test to exercise this code.
> 
> Thanks,
> Alan.


-- 
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...




More information about the serviceability-dev mailing list