RFR 8161354: policytool fails if it needs to show an error dialog before the main window appears
Sean Mullan
sean.mullan at oracle.com
Thu Jul 14 11:22:43 UTC 2016
Looks ok to me. Make sure you add a noreg label to the bug.
--Sean
On 07/14/2016 04:30 AM, Weijun Wang wrote:
> 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
More information about the security-dev
mailing list