mirror of https://github.com/apache/cloudstack.git
compare null to non-null or not-empty-string
This commit is contained in:
parent
7c8ef7836c
commit
61d48154fd
|
|
@ -1406,6 +1406,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))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -178,5 +178,6 @@ public class NetUtilsTest extends TestCase {
|
|||
public void testSameIsolationId() {
|
||||
assertTrue(NetUtils.isSameIsolationId("1", "vlan://1"));
|
||||
assertTrue(NetUtils.isSameIsolationId("", null));
|
||||
assertFalse(NetUtils.isSameIsolationId("bla", null));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue