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

policytool fails if it needs to show an error dialog before the main window appears

XMLWordPrintable

    • b128
    • Not verified

      This happens when the policy file has an error and cannot be loaded successfully, and it fails with

      Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
              at java.awt.Component.getLocationOnScreen_NoTreeLock(java.desktop/Component.java:2079)
              at java.awt.Component.getLocationOnScreen(java.desktop/Component.java:2053)
              at sun.security.tools.policytool.ToolWindow.displayErrorDialog(jdk.policytool/PolicyTool.java:1381)
              at sun.security.tools.policytool.ToolWindow.initWindow(jdk.policytool/PolicyTool.java:1222)
              at sun.security.tools.policytool.ToolWindow.displayToolWindow(jdk.policytool/PolicyTool.java:1359)
              at sun.security.tools.policytool.PolicyTool$1.run(jdk.policytool/PolicyTool.java:750)
              at java.awt.event.InvocationEvent.dispatch(java.desktop/InvocationEvent.java:313)
              at java.awt.EventQueue.dispatchEventImpl(java.desktop/EventQueue.java:759)
              at java.awt.EventQueue.access$500(java.desktop/EventQueue.java:97)
              at java.awt.EventQueue$3.run(java.desktop/EventQueue.java:712)
              at java.awt.EventQueue$3.run(java.desktop/EventQueue.java:706)
              at java.security.AccessController.doPrivileged(java.base/Native Method)
              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(java.base/ProtectionDomain.java:77)
              at java.awt.EventQueue.dispatchEvent(java.desktop/EventQueue.java:729)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(java.desktop/EventDispatchThread.java:199)
              at java.awt.EventDispatchThread.pumpEventsForFilter(java.desktop/EventDispatchThread.java:124)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(java.desktop/EventDispatchThread.java:113)
              at java.awt.EventDispatchThread.pumpEvents(java.desktop/EventDispatchThread.java:109)
              at java.awt.EventDispatchThread.pumpEvents(java.desktop/EventDispatchThread.java:101)
              at java.awt.EventDispatchThread.run(java.desktop/EventDispatchThread.java:90)

            weijun Weijun Wang
            weijun Weijun Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: