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

FileDialog.getLocationOnScreen throws NPE on Win

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • 7
    • 7
    • client-libs
    • None
    • x86
    • windows_7

      FileDialog.getLocationOnScreen throws NPE on Win. Simple test attached. Issue is reproducible on JDK 7 b120, JDK1.6.0_22 on Win7, WinXP.

      Test output:
      java version "1.6.0_22"
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
      Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
      Exception in thread "main" java.lang.NullPointerException: null pData
              at sun.awt.windows.WComponentPeer.getLocationOnScreen(Native Method)
              at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1939)
              at java.awt.Component.getLocationOnScreen(Component.java:1917)
              at FileDialogTest.main(FileDialogTest.java:30)

      On Solaris and OEL5.5 that method works, but returns wrong value.

            Unassigned Unassigned
            istolyar Igor Stolyarov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: