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 9edeb24
Date Tue, 28 Jan 2014 15:36:34 GMT
Updated Branches:
  refs/heads/master fae055602 -> 9edeb24f3


findbugs: assign result of string manipulations(cherry picked from
commit 20127e09dc0e341a2f790a8a52cded4c5f1f0cc1)

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

Branch: refs/heads/master
Commit: 9edeb24f3fc64bc5dd42f466fd65025884cee63a
Parents: fae0556
Author: Daan Hoogland <daan@onecht.net>
Authored: Tue Jan 28 16:36:27 2014 +0100
Committer: Daan Hoogland <dhoogland@schubergphilis.com>
Committed: Tue Jan 28 16:36:27 2014 +0100

----------------------------------------------------------------------
 .../security/SecurityGroupManagerImpl.java      |  7 +++--
 server/src/com/cloud/test/IPRangeConfig.java    | 29 ++------------------
 2 files changed, 6 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9edeb24f/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java b/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
index cd68440..d5f9405 100755
--- a/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
+++ b/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
@@ -40,6 +40,9 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupEgressCmd;
 import org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupIngressCmd;
 import org.apache.cloudstack.api.command.user.securitygroup.CreateSecurityGroupCmd;
@@ -51,8 +54,6 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
 import org.apache.cloudstack.managed.context.ManagedContextRunnable;
 import org.apache.cloudstack.utils.identity.ManagementServerNode;
-import org.apache.commons.codec.digest.DigestUtils;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.NetworkRulesSystemVmCommand;
@@ -373,7 +374,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro
 
     protected String generateRulesetSignature(Map<PortAndProto, Set<String>>
ingress, Map<PortAndProto, Set<String>> egress) {
         String ruleset = ingress.toString();
-        ruleset.concat(egress.toString());
+        ruleset = ruleset.concat(egress.toString());
         return DigestUtils.md5Hex(ruleset);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9edeb24f/server/src/com/cloud/test/IPRangeConfig.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/test/IPRangeConfig.java b/server/src/com/cloud/test/IPRangeConfig.java
index f461995..1d56471 100755
--- a/server/src/com/cloud/test/IPRangeConfig.java
+++ b/server/src/com/cloud/test/IPRangeConfig.java
@@ -69,7 +69,7 @@ public class IPRangeConfig {
 
             long zoneId = PodZoneConfig.getZoneId(zone);
             result = changeRange(op, "public", -1, zoneId, startIP, endIP, null, -1);
-            result.replaceAll("<br>", "/n");
+            result = result.replaceAll("<br>", "/n");
             System.out.println(result);
         } else if (type.equals("private")) {
             if (args.length != 5 && args.length != 6) {
@@ -92,7 +92,7 @@ public class IPRangeConfig {
             long podId = PodZoneConfig.getPodId(pod, zone);
             long zoneId = PodZoneConfig.getZoneId(zone);
             result = changeRange(op, "private", podId, zoneId, startIP, endIP, null, -1);
-            result.replaceAll("<br>", "/n");
+            result = result.replaceAll("<br>", "/n");
             System.out.println(result);
         } else {
             printError(usage());
@@ -569,31 +569,6 @@ public class IPRangeConfig {
             "Unable to start DB connection to read guest cidr network. Please contact Cloud
Support.");
     }
 
-//    public static String getGuestIpNetwork() {
-//        return DatabaseConfig.getDatabaseValueString("SELECT * FROM `cloud`.`configuration`
WHERE name = \"guest.ip.network\"", "value",
-//        "Unable to start DB connection to read guest IP network. Please contact Cloud Support.");
-//    }
-//
-//    public static String getGuestNetmask() {
-//        return DatabaseConfig.getDatabaseValueString("SELECT * FROM `cloud`.`configuration`
WHERE name = \"guest.netmask\"", "value",
-//        "Unable to start DB connection to read guest netmask. Please contact Cloud Support.");
-//    }
-
-//    public static String getGuestSubnet() {
-//        String guestIpNetwork = getGuestIpNetwork();
-//        String guestNetmask = getGuestNetmask();
-//
-//        if (guestIpNetwork == null || guestIpNetwork.isEmpty()) printError("Please enter
a valid guest IP network address.");
-//        if (guestNetmask == null || guestNetmask.isEmpty()) printError("Please enter a
valid guest IP network netmask");
-//
-//        return NetUtils.getSubNet(guestIpNetwork, guestNetmask);
-//    }
-
-//    public static long getGuestCidrSize() {
-//        String guestNetmask = getGuestNetmask();
-//        return NetUtils.getCidrSize(guestNetmask);
-//    }
-
     public static boolean validCIDR(final String cidr) {
         if (cidr == null || cidr.isEmpty()) {
             return false;


Mime
View raw message