/hg/icedtea-web: Fix policyeditor file flag to work when used st...

jkang at icedtea.classpath.org jkang at icedtea.classpath.org
Thu Apr 30 14:52:02 UTC 2015


changeset 2b992e566c1f in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=2b992e566c1f
author: Jie Kang <jkang at redhat.com>
date: Thu Apr 30 10:43:22 2015 -0400

	Fix policyeditor file flag to work when used standalone

	2015-04-30  Jie Kang  <jkang at 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


diffstat:

 ChangeLog                                                         |   7 +++++
 netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java |  12 +++++----
 2 files changed, 14 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r 1b33e7e860d9 -r 2b992e566c1f ChangeLog
--- a/ChangeLog	Tue Apr 28 14:44:03 2015 +0200
+++ b/ChangeLog	Thu Apr 30 10:43:22 2015 -0400
@@ -1,3 +1,10 @@
+2015-04-30  Jie Kang  <jkang at 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-28  Jiri Vanek  <jvanek at redhat.com>
 
 	Fixed incorrect usage of apostrophes in intro generation
diff -r 1b33e7e860d9 -r 2b992e566c1f netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
--- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Tue Apr 28 14:44:03 2015 +0200
+++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Thu Apr 30 10:43:22 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);


More information about the distro-pkg-dev mailing list