Please review the patch below:
diff --git
a/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
b/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
---
a/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
+++
b/src/jdk.policytool/share/classes/sun/security/tools/policytool/PolicyTool.java
@@ -1376,10 +1376,6 @@
ToolDialog ed = new ToolDialog
(PolicyTool.getMessage("Error"), tool, this, true);
- // find where the PolicyTool gui is
- Point location = ((w == null) ?
- getLocationOnScreen() : w.getLocationOnScreen());
- //ed.setBounds(location.x + 50, location.y + 50, 600, 100);
ed.setLayout(new GridBagLayout());
JLabel label = new JLabel(error);
location is already useless before this fix.
I am trying to use policytool to load an illegal policy file and the
tool wants to display an error dialog before the main windows shows up,
and the getLocationOnScreen() method above fails.
Noreg-trivial && noreg-cleanup.
Thanks
Max