Hello. Please review the fix for JDK 13. Bug: https://bugs.openjdk.java.net/browse/JDK-8213516 Fix: http://cr.openjdk.java.net/~serb/8213516/webrev.00
We have a bug in our implementation of the cache in the AccessibleBundle class. The current cache should cache the "value" per compound key "locale+name_bundle", but the only locale is used. The problem is reproduced when we try to use different resource bundles for one locale. One of the previous version of the fix was sent here: https://mail.openjdk.java.net/pipermail/swing-dev/2019-March/009509.html http://cr.openjdk.java.net/~sveerabhadra/8213516/webrev.06 Since this is a cache I have an assumption that the performance of this code matters. So I decided to measure the difference before/after the fix, and w/o cache of AccessibleRole.LABEL.toDisplayString(Locale.ENGLISH); BEFORE: 25.826 ops/MICROSECONDS AFTER: 5.459 ops/MICROSECONDS WITHOUT CACHE 11.015 ops/MICROSECONDS ======= This cache was added in jdk 1.3 in 1999 using this description: "Obtaining resource bundles can be expensive,...A time performance improvement can be made if we cache the resource bundles by locale. We probably should also see if ResourceBundle itself caches these for us" ======= I have checked that the current implementation of ResourceBundle caches its state and our implementation does not provide any real benefit. -- Best regards, Sergey.