cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sate...@apache.org
Subject [06/50] [abbrv] git commit: updated refs/heads/vmware-datamodel to d07f875
Date Sun, 19 May 2013 12:05:37 GMT
instead of '==', use equals() to compare two strings in cloud-server


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

Branch: refs/heads/vmware-datamodel
Commit: e26442f7d0abd9cf7cfefc85585fdd669af395a6
Parents: 6d57393
Author: Mice Xia <mice_xia@tcloudcomputing.com>
Authored: Thu May 16 16:18:53 2013 +0800
Committer: Mice Xia <mice_xia@tcloudcomputing.com>
Committed: Thu May 16 16:18:53 2013 +0800

----------------------------------------------------------------------
 .../configuration/ConfigurationManagerImpl.java    |    2 +-
 server/src/com/cloud/test/DatabaseConfig.java      |    4 ++--
 server/src/com/cloud/vm/UserVmManagerImpl.java     |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e26442f7/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 96145a2..8878782 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -2491,7 +2491,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements
Configurati
                 if ( vlans != null && vlans.size() > 0 ) {
                     if ( vlanId == null ) {
                         vlanId = vlan.getVlanTag();
-                    } else if ( vlan.getVlanTag() != vlanId ) {
+                    } else if (!vlan.getVlanTag().equals(vlanId)) {
                         throw new InvalidParameterValueException("there is already one vlan
" + vlan.getVlanTag() + " on network :" +
                                 + network.getId() + ", only one vlan is allowed on guest
network");
                     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e26442f7/server/src/com/cloud/test/DatabaseConfig.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/test/DatabaseConfig.java b/server/src/com/cloud/test/DatabaseConfig.java
index 7c10f98..70c8178 100755
--- a/server/src/com/cloud/test/DatabaseConfig.java
+++ b/server/src/com/cloud/test/DatabaseConfig.java
@@ -792,14 +792,14 @@ public class DatabaseConfig {
         }
 
         // If a netmask was provided, check that the startIP, endIP, and gateway all belong
to the same subnet
-        if (netmask != null && netmask != "") {
+        if (netmask != null && !netmask.equals("")) {
             if (endIP != null) {
                 if (!IPRangeConfig.sameSubnet(startIP, endIP, netmask)) {
                     printError("Start and end IPs for the public IP range must be in the
same subnet, as per the provided netmask.");
                 }
             }
 
-            if (gateway != null && gateway != "") {
+            if (gateway != null && !gateway.equals("")) {
                 if (!IPRangeConfig.sameSubnet(startIP, gateway, netmask)) {
                     printError("The start IP for the public IP range must be in the same
subnet as the gateway, as per the provided netmask.");
                 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e26442f7/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index fe80d2c..7416cae 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -1673,7 +1673,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Use
 
         String description = "";
 
-        if (displayName != vmInstance.getDisplayName()) {
+        if (!displayName.equals(vmInstance.getDisplayName())) {
             description += "New display name: " + displayName + ". ";
         }
 


Mime
View raw message