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/4.3-forward to 20127e0
Date Sun, 26 Jan 2014 22:50:14 GMT
Updated Branches:
  refs/heads/4.3-forward 0b13f8e59 -> 20127e09d


findbugs: assign result of string manipulations

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

Branch: refs/heads/4.3-forward
Commit: 20127e09dc0e341a2f790a8a52cded4c5f1f0cc1
Parents: 0b13f8e
Author: Daan Hoogland <daan@onecht.net>
Authored: Sun Jan 26 23:49:56 2014 +0100
Committer: Daan Hoogland <daan@onecht.net>
Committed: Sun Jan 26 23:49:56 2014 +0100

----------------------------------------------------------------------
 .../network/security/SecurityGroupManagerImpl.java     |  7 ++++---
 server/src/com/cloud/test/IPRangeConfig.java           | 13 ++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20127e09/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 c7b6e1e..e48bb34 100755
--- a/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
+++ b/server/src/com/cloud/network/security/SecurityGroupManagerImpl.java
@@ -42,6 +42,7 @@ 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;
@@ -376,7 +377,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);
     }
 
@@ -401,7 +402,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro
         if (s_logger.isTraceEnabled()) {
             s_logger.trace("Security Group Mgr: scheduling ruleset updates for " + affectedVms.size()
+ " vms");
         }
-        boolean locked = _workLock.lock(_globalWorkLockTimeout); 
+        boolean locked = _workLock.lock(_globalWorkLockTimeout);
         if (!locked) {
             s_logger.warn("Security Group Mgr: failed to acquire global work lock");
             return;
@@ -885,7 +886,7 @@ public class SecurityGroupManagerImpl extends ManagerBase implements SecurityGro
 
         _serverId = ManagementServerNode.getManagementServerId();
 
-        s_logger.info("SecurityGroupManager: num worker threads=" + _numWorkerThreads + 
+        s_logger.info("SecurityGroupManager: num worker threads=" + _numWorkerThreads +
                 ", time between cleanups=" + _timeBetweenCleanups + " global lock timeout="
+ _globalWorkLockTimeout);
         createThreadPools();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20127e09/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 23ca1bb..0669c55 100755
--- a/server/src/com/cloud/test/IPRangeConfig.java
+++ b/server/src/com/cloud/test/IPRangeConfig.java
@@ -28,7 +28,6 @@ import java.util.Vector;
 
 import com.cloud.utils.component.ComponentContext;
 import com.cloud.utils.db.DB;
-import com.cloud.utils.db.Transaction;
 import com.cloud.utils.db.TransactionLegacy;
 import com.cloud.utils.net.NetUtils;
 
@@ -72,7 +71,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) {
@@ -94,7 +93,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());
@@ -515,7 +514,7 @@ public class IPRangeConfig {
         } catch (Exception ex) {
             System.out.print(ex.getMessage());
             ex.printStackTrace();
-        } 
+        }
 
         return problemIPs;
     }
@@ -574,7 +573,7 @@ public class IPRangeConfig {
 //		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.");
@@ -583,10 +582,10 @@ public class IPRangeConfig {
 //	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);
 //	}
 


Mime
View raw message