Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8049301

Suspicious use of string identity checks in JComponent.setUIProperty

XMLWordPrintable

      During the course of fixing JDK-8043550, it was observed that 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.

      If equality checks are semantically correct, this method could be rewritten to use strings in switch.

            psadhukhan Prasanta Sadhukhan
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: