cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ko...@apache.org
Subject [2/2] git commit: updated refs/heads/master to e24bf73
Date Tue, 22 Apr 2014 21:23:42 GMT
Potential NPE dereference fix

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>


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

Branch: refs/heads/master
Commit: 9411e4517e1669913bb740b03ae27f7e68a2c255
Parents: 4cb3e55
Author: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Authored: Tue Apr 22 22:36:06 2014 +0200
Committer: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Committed: Tue Apr 22 22:47:05 2014 +0200

----------------------------------------------------------------------
 .../lb/LoadBalancingRulesManagerImpl.java       | 26 +++++++++++---------
 1 file changed, 14 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9411e451/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index 91b6aa4..44047bf 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -1951,13 +1951,14 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
     @Override
     public boolean removeAllLoadBalanacersForIp(long ipId, Account caller, long callerUserId)
{
         List<FirewallRuleVO> rules = _firewallDao.listByIpAndPurposeAndNotRevoked(ipId,
Purpose.LoadBalancing);
-        if (rules != null)
+        if (rules != null) {
             s_logger.debug("Found " + rules.size() + " lb rules to cleanup");
-        for (FirewallRule rule : rules) {
-            boolean result = deleteLoadBalancerRule(rule.getId(), true, caller, callerUserId,
false);
-            if (result == false) {
-                s_logger.warn("Unable to remove load balancer rule " + rule.getId());
-                return false;
+            for (FirewallRule rule : rules) {
+                boolean result = deleteLoadBalancerRule(rule.getId(), true, caller, callerUserId,
false);
+                if (result == false) {
+                    s_logger.warn("Unable to remove load balancer rule " + rule.getId());
+                    return false;
+                }
             }
         }
         return true;
@@ -1966,13 +1967,14 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
     @Override
     public boolean removeAllLoadBalanacersForNetwork(long networkId, Account caller, long
callerUserId) {
         List<FirewallRuleVO> rules = _firewallDao.listByNetworkAndPurposeAndNotRevoked(networkId,
Purpose.LoadBalancing);
-        if (rules != null)
+        if (rules != null) {
             s_logger.debug("Found " + rules.size() + " lb rules to cleanup");
-        for (FirewallRule rule : rules) {
-            boolean result = deleteLoadBalancerRule(rule.getId(), true, caller, callerUserId,
false);
-            if (result == false) {
-                s_logger.warn("Unable to remove load balancer rule " + rule.getId());
-                return false;
+            for (FirewallRule rule : rules) {
+                boolean result = deleteLoadBalancerRule(rule.getId(), true, caller, callerUserId,
false);
+                if (result == false) {
+                    s_logger.warn("Unable to remove load balancer rule " + rule.getId());
+                    return false;
+                }
             }
         }
         return true;


Mime
View raw message