<Swing Dev> [11][JDK-8197785]javax.accessibility.AccessibilityBundle will reload the ResourceBundle for every call to toDisplayString
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Wed Mar 7 19:34:13 UTC 2018
On 07/03/2018 11:17, semyon.sadetsky at oracle.com wrote:
>> I found nothing related to the behavior, only some conclusion about
>> possible performance difference.
> So you agree?
Agreed with what? Unrelated to the current fix and unproven possible
performance change in rare situation is not outweigh the change in behavior.
>>> Returning null is better than throwing NPE especially in the case
>>> when NPE doesn't correspond to the spec. Krishna kindly agreed to fix
>>> both issues at once. I didn't get what is the problem?
>>
>> Nope, if the method start to return null means that all its usage
>> should be checked for null return value.
> You always should check for null return if the spec does not say that
> null is never returned. In this specific case if null check is absent
> the NPE will be thrown in the user code instead of JDK code, so there is
> no degradation.
>> As I said it is better to use version .01 which fixed the problem w/o
>> side effects.
>>
> Thanks for your advice. Try to provide more arguments next time.
You are welcome.
--
Best regards, Sergey.
More information about the swing-dev
mailing list