<Swing Dev> RFR: 8049301: Suspicious use of string identity checks in JComponent.setUIProperty [v2]

Prasanta Sadhukhan psadhukhan at openjdk.java.net
Fri Jul 30 10:38:58 UTC 2021


> 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

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4943/files
  - new: https://git.openjdk.java.net/jdk/pull/4943/files/bd43899a..62418e5b

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4943&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4943&range=00-01

  Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4943.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4943/head:pull/4943

PR: https://git.openjdk.java.net/jdk/pull/4943


More information about the swing-dev mailing list