On Fri, 30 Jul 2021 10:38:58 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
>> JComponent.setUIProperty method uses string identity check (==) rather than >> string equality checks (.equals) when comparing against the property name. >> This is suspicious since string identity and equality and equivalent only >> for interned strings. >> Rectified to use String.equals() check. > > Prasanta Sadhukhan has updated the pull request incrementally with one > additional commit since the last revision: > > Prevent NPE I believe it was an optimisation to make comparison as quick as possible. There are many places in Swing where property keys are compared as object identity rather than using `equals`. If this place is changed, probably all other such places need updating if they haven't been updated to `equals` yet. ------------- PR: https://git.openjdk.java.net/jdk/pull/4943