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

NPE in sun.org.mozilla.javascript.internal.ScriptableObject

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 6
    • core-libs

      FULL PRODUCT VERSION :
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b41)
      Java HotSpot(TM) Server VM (build 1.6.0-ea-b41, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      SunOS ceti.umiacs.umd.edu 5.9 gspot:s9u2_beta:07/09/2003 sun4u sparc SUNW,Sun-Fire

      A DESCRIPTION OF THE PROBLEM :
      In the sun.org.mozilla.javascript.internal.ScriptableObject.getPropertyIds(Scriptable obj) method, the local variable map is never assigned any value other than null. As a result, the deferences of map on lines 1497 and 1502 will throw null pointer exceptions.

      The code is pretty clearly broken, and the only way the method can fail to throw a NPE is if both result and ids are zero length arrays.

      This bug was found by FindBugs, a static analysis tools for finding bugs in Java programs.


      REPRODUCIBILITY :
      This bug can be reproduced always.
      ###@###.### 2005-06-22 22:16:15 GMT

            sundar Sundararajan Athijegannathan
            gmanwanisunw Girish Manwani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: