<Swing Dev> RFR: 8049301: Suspicious use of string identity checks in JComponent.setUIProperty
    Prasanta Sadhukhan 
    psadhukhan at openjdk.java.net
       
    Fri Jul 30 06:10:46 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.
-------------
Commit messages:
 - 8049301: Suspicious use of string identity checks in JComponent.setUIProperty
Changes: https://git.openjdk.java.net/jdk/pull/4943/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4943&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8049301
  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