Mercurial > hg > release > icedtea-web-1.6
changeset 1229:9cfc396945d1
Fix policyeditor file flag to work when used standalone
2015-04-30 Jie Kang <jkang@redhat.com>
Fix policyeditor file flag to work when used standalone
* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java:
(main): filepath no longer set to null when file flag has parameter and
there is no main argument
author | Jie Kang <jkang@redhat.com> |
---|---|
date | Mon, 04 May 2015 08:48:43 -0400 |
parents | d62fab3ea0c1 |
children | 1b191e3c2f91 |
files | ChangeLog netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java |
diffstat | 2 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Apr 29 11:34:14 2015 +0200 +++ b/ChangeLog Mon May 04 08:48:43 2015 -0400 @@ -1,3 +1,10 @@ +2015-05-04 Jie Kang <jkang@redhat.com> + + Fix policyeditor file flag to work when used standalone + * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: + (main): filepath no longer set to null when file flag has parameter and + there is no main argument + 2015-04-29 Jiri Vanek <jvanek@redhat.com> 1.6 post-release operations
--- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java Wed Apr 29 11:34:14 2015 +0200 +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java Mon May 04 08:48:43 2015 -0400 @@ -1629,11 +1629,13 @@ @Override public void run() { String filepath = optionParser.getParam(OptionsDefinitions.OPTIONS.FILE); - if (optionParser.getMainArgs().size() == 0) { - filepath = null; - } else if (filepath.isEmpty()) { - // maybe the user just forgot the -file flag, so try to open anyway - filepath = optionParser.getMainArg(); + if (filepath.isEmpty()) { + if (optionParser.getMainArgs().size() == 0) { + filepath = null; + } else { + // maybe the user just forgot the -file flag, so try to open anyway + filepath = optionParser.getMainArg(); + } } final PolicyEditorWindow frame = getPolicyEditorFrame(filepath); frame.asWindow().setVisible(true);