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

DefaultPopupFactory causes NullPointerException if parent is null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • client-libs



      Name: krC82822 Date: 10/25/2000


      25 Oct 2000, eval1127@eng -- still present in the 1.3.1 sources (see Comments section)

      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)

      There is a bug in DefaultPopupFactory.java, method PanelPopup.hide(), line 956.
      If parent is null, it throws a NullPointerException.

      After this happens once, mouse motion over JTables and JTrees generates
      numerous exceptions, and all JTables and Trees become unusable after that (at
      least in my application).

      DefaultPopupFactory.java:

      line#
      ----
      951 public void hide() {
      952 Container parent = getParent();
      953 Rectangle r = this.getBounds();
      954 if(parent != null)
      955 parent.remove(this);
      956 bug ==> parent.repaint(r.x,r.y,r.width,r.height);
      957 }
      (Review ID: 111382)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: