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

BasicTreeUI uses comparision that will never be true.

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.5.0_06"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
      Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      Linux localhost 2.6.8-2-686 #1 Tue Aug 16 13:22:48 UTC 2005 i686 GNU/Linux

      A DESCRIPTION OF THE PROBLEM :
      In the propertyChange(PropertyChangeEvent)-method of the inner class Handler of the class BasicTreeUI the following code occures:
      else if(changeName == "font") {
      [...]
      }
      else if (changeName == "componentOrientation") {
      [...]
                      } else if ("transferHandler" == changeName) {
      [...]
      }
      None of these comparisions will ever be true, changeName.equals(String) must be used here.


      REPRODUCIBILITY :
      This bug can be reproduced always.

            shickeysunw Shannon Hickey (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: