aboutsummaryrefslogtreecommitdiffstats
path: root/netx
diff options
context:
space:
mode:
Diffstat (limited to 'netx')
-rw-r--r--netx/net/sourceforge/jnlp/JNLPFile.java2
-rw-r--r--netx/net/sourceforge/jnlp/SecurityDesc.java4
-rw-r--r--netx/net/sourceforge/jnlp/Version.java5
3 files changed, 6 insertions, 5 deletions
diff --git a/netx/net/sourceforge/jnlp/JNLPFile.java b/netx/net/sourceforge/jnlp/JNLPFile.java
index 714ff7e..5ddb989 100644
--- a/netx/net/sourceforge/jnlp/JNLPFile.java
+++ b/netx/net/sourceforge/jnlp/JNLPFile.java
@@ -208,7 +208,7 @@ public class JNLPFile {
//(i.e. If the jnlp file being launched exist locally, but it
//originated from a website, then download the one from the website
//into the cache).
- if (sourceLocation != null && location.getProtocol() == "file") {
+ if (sourceLocation != null && "file".equals(location.getProtocol())) {
openURL(sourceLocation, version, policy);
}
diff --git a/netx/net/sourceforge/jnlp/SecurityDesc.java b/netx/net/sourceforge/jnlp/SecurityDesc.java
index abb61bd..9455c9a 100644
--- a/netx/net/sourceforge/jnlp/SecurityDesc.java
+++ b/netx/net/sourceforge/jnlp/SecurityDesc.java
@@ -202,7 +202,7 @@ public class SecurityDesc {
PermissionCollection permissions = getSandBoxPermissions();
// discard sandbox, give all
- if (type == ALL_PERMISSIONS) {
+ if (ALL_PERMISSIONS.equals(type)) {
permissions = new Permissions();
if (customTrustedPolicy == null) {
permissions.add(new AllPermission());
@@ -213,7 +213,7 @@ public class SecurityDesc {
}
// add j2ee to sandbox if needed
- if (type == J2EE_PERMISSIONS)
+ if (J2EE_PERMISSIONS.equals(type))
for (int i = 0; i < j2eePermissions.length; i++)
permissions.add(j2eePermissions[i]);
diff --git a/netx/net/sourceforge/jnlp/Version.java b/netx/net/sourceforge/jnlp/Version.java
index eeb4536..99e7cd6 100644
--- a/netx/net/sourceforge/jnlp/Version.java
+++ b/netx/net/sourceforge/jnlp/Version.java
@@ -230,6 +230,7 @@ public class Version {
Integer number2 = Integer.valueOf(0);
// compare as integers
+ // for normalization key, compare exact object, not using .equals
try {
if (!(part1 == emptyString)) // compare to magic normalization key
number1 = Integer.valueOf(part1);
@@ -242,9 +243,9 @@ public class Version {
// means to compare as strings
}
- if (part1 == emptyString)
+ if (part1 == emptyString) // compare to magic normalization key
part1 = "";
- if (part2 == emptyString)
+ if (part2 == emptyString) // compare to magic normalization key
part2 = "";
return part1.compareTo(part2);