RFR JDK-8016592: Clean-up Javac Overrides Warnings In javax/management/NotificationBroadcasterSupport.java

Dan Xu dan.xu at oracle.com
Tue Jun 18 11:35:22 PDT 2013


Thanks for your feedbacks.

I have updated my changes and uploaded to webrev at 
http://cr.openjdk.java.net/~dxu/8016592/webrev.01/. I have tested the 
fix with the jck tests and regression tests. And the results look good. 
Thanks!

-Dan


On 06/17/2013 01:03 AM, Daniel Fuchs wrote:
> Hi Dan,
>
> 1. To be on the safe side I'd suggest to use:
>
> return Objects.hashCode(listener); rather than
> plain return listener.hashCode().
>
> (I see that
> removeNotificationListener(...) does not check for null).
>
> 2. I wouldn't have changed WildcardListenerInfo.equals();
>
>    If you insist in changing it then I think the proper
>    implementation would be:
>
>  317             if (!(o instanceof ListenerInfo))
>  318                 return false;
>  319             return ((ListenerInfo)o).listener == this.listener;
>
>    which would have the advantage of being more straightforward, and
>    the disadvantage of not making programatically obvious that:
>        W.equals(L) == L.equals(W) always
>    (where W is WLI and L is a plain LI)
>
> Please make sure to run jck for javax/management and
> java/lang/management in addition to unit tests.
>
> best regards,
>
> -- daniel
>
> On 6/14/13 9:49 PM, Dan Xu wrote:
>> Hi,
>>
>> I have a simple fix to clean up the new javac overrides warnings in
>> NotificationBroadcasterSupport.java file. Please help review it. Thanks!
>>
>> webrev: http://cr.openjdk.java.net/~dxu/8016592/webrev.00/
>> <http://cr.openjdk.java.net/%7Edxu/8016592/webrev.00/>
>> bug: http://bugs.sun.com/view_bug.do?bug_id=8016592
>>
>> -Dan
>



More information about the serviceability-dev mailing list