changeset 1181:716fc6d1463a

Fixed a string comparison bug in PolicyEditor.main
author Andrew Azores <aazores@redhat.com>
date Wed, 18 Mar 2015 12:43:51 -0400
parents b8689b23ce0b
children 7895d4fc25aa
files ChangeLog netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Mar 18 16:56:46 2015 +0100
+++ b/ChangeLog	Wed Mar 18 12:43:51 2015 -0400
@@ -1,3 +1,9 @@
+2015-03-18  Andrew Azores  <aazores@redhat.com>
+
+	* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: (main)
+	Fixed a bug where a local string variable was compared to the empty string
+	using ==.
+
 2015-03-18  Jiri Vanek  <jvanek@redhat.com>
 
 	* NEWS: mentioned documentation. -html and menu shortcuts moved to general.
--- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Wed Mar 18 16:56:46 2015 +0100
+++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java	Wed Mar 18 12:43:51 2015 -0400
@@ -1627,7 +1627,7 @@
                 String filepath = optionParser.getParam(OptionsDefinitions.OPTIONS.FILE);
                 if (optionParser.getMainArgs().size() == 0) {
                     filepath = null;
-                } else if (filepath == "") {
+                } else if (filepath.isEmpty()) {
                     // maybe the user just forgot the -file flag, so try to open anyway
                     filepath = optionParser.getMainArg();
                 }