cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject git commit: updated refs/heads/master to 65383fb
Date Mon, 08 Jun 2015 07:30:40 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 1ca74dac2 -> 65383fb8f


Fix another findbugs high priority warning JuniperSrxResource.java:2617, ES_COMPARING_STRINGS_WITH_EQ,
Priority: High Comparison of String objects using == or != in com.cloud.network.resource.JuniperSrxResource.manageApplication(JuniperSrxResource$SecurityPolicyType,
JuniperSrxResource$SrxCommand, JuniperSrxResource$Protocol, int, int)

This now correctly compares strings

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>

This closes #364


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/65383fb8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/65383fb8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/65383fb8

Branch: refs/heads/master
Commit: 65383fb8fa2d927cccf0357359d5fa41dec7aed6
Parents: 1ca74da
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Sun Jun 7 21:18:11 2015 +0200
Committer: Daan Hoogland <daan.hoogland@gmail.com>
Committed: Mon Jun 8 09:30:38 2015 +0200

----------------------------------------------------------------------
 .../src/com/cloud/network/resource/JuniperSrxResource.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65383fb8/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
index b2f8596..2133937 100644
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java
@@ -2614,7 +2614,7 @@ public class JuniperSrxResource implements ServerResource {
                 xml = SrxXml.APPLICATION_ADD.getXml();
                 xml = replaceXmlValue(xml, "name", applicationName);
                 xml = replaceXmlValue(xml, "protocol", protocol.toString());
-                if (protocol.toString() == Protocol.icmp.toString()) {
+                if (protocol.toString().equals(Protocol.icmp.toString())) {
                     icmpOrDestPort = "<icmp-type>" + startPort + "</icmp-type>";
                     icmpOrDestPort += "<icmp-code>" + endPort + "</icmp-code>";
                 } else {


Mime
View raw message