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.

            Assignee:
            Prasanta Sadhukhan
            Reporter:
            Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: