mirror of https://github.com/apache/cloudstack.git
compare null to non-null or not-empty-string
This commit is contained in:
parent
c2b5addaed
commit
62c9343658
|
|
@ -1398,6 +1398,12 @@ public class NetUtils {
|
|||
{
|
||||
return true;
|
||||
}
|
||||
if ((one == null || other == null)
|
||||
&&
|
||||
!(one == null && other == null))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// check 'untagged'
|
||||
if (VLAN_UNTAGGED.equalsIgnoreCase(one) && VLAN_UNTAGGED.equalsIgnoreCase(other))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -182,5 +182,6 @@ public class NetUtilsTest extends TestCase {
|
|||
assertTrue(NetUtils.isSameIsolationId("UnTagged", "vlan://uNtAGGED"));
|
||||
assertFalse(NetUtils.isSameIsolationId("2", "vlan://uNtAGGED"));
|
||||
assertFalse(NetUtils.isSameIsolationId("2", "vlan://3"));
|
||||
assertFalse(NetUtils.isSameIsolationId("bla", null));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue