mirror of https://github.com/apache/cloudstack.git
instead of '==', use equals() to compare two strings in cloud-server
This commit is contained in:
parent
6d57393629
commit
e26442f7d0
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 + ". ";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue