Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 53EDB9261 for ; Thu, 16 May 2013 19:23:10 +0000 (UTC) Received: (qmail 328 invoked by uid 500); 16 May 2013 19:23:03 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 268 invoked by uid 500); 16 May 2013 19:23:03 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 99362 invoked by uid 99); 16 May 2013 19:23:02 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 May 2013 19:23:02 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6C62715155; Thu, 16 May 2013 19:23:02 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: prachidamle@apache.org To: commits@cloudstack.apache.org Date: Thu, 16 May 2013 19:23:22 -0000 Message-Id: <5216b9378adc47058e192a9561d634a5@git.apache.org> In-Reply-To: <1f36bab2b9a24e4592aaa3f48e23dc07@git.apache.org> References: <1f36bab2b9a24e4592aaa3f48e23dc07@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [22/31] git commit: updated refs/heads/planner_reserve to db4f335 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/planner_reserve Commit: e26442f7d0abd9cf7cfefc85585fdd669af395a6 Parents: 6d57393 Author: Mice Xia Authored: Thu May 16 16:18:53 2013 +0800 Committer: Mice Xia 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 + ". "; }