7192275: Minimize LogManager dependencies on java.beans

Dmitry Samersoff Dmitry.Samersoff at oracle.com
Sun Aug 19 00:50:02 PDT 2012


Alan,


On 2012-08-18 23:37, Alan Bateman wrote:
> Thanks for reviewing this, replies inline.
> 
> On 18/08/2012 13:56, Dmitry Samersoff wrote:
>> Alan,
>>
>> 1. 315 - IMHO, it's better to call checkAccess() before null pointer
>> check. This problem exists in original code as well.
> If there are two or more exceptions that are appropriate for a
> particular case then developers have to prepared for either. 

I'm not sure it's correct in generic case - exception it self could be
untrusted code so on my opinion security check have to be done first,
before everything else.

But I'm ok to leave everything as is in this case because it doesn't
make things worth. Value of security check in non-final method is
doubtful anyway.

>> 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                 }
>>
> It is intentional as the spec requires that a listener be invoked for as
> many times as it is registered. I could of course have used a while loop
> instead, maybe "while (count-- > 0)" but I think the above is clear.

Thank you for clarification. I'm OK with for loop, but extra comments
there wold be helpful.

-Dmitry

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




More information about the serviceability-dev mailing list