You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/01/06 11:28:56 UTC
git commit: updated refs/heads/master to 62c9343
Updated Branches:
refs/heads/master c2b5addae -> 62c934365
compare null to non-null or not-empty-string
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/62c93436
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/62c93436
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/62c93436
Branch: refs/heads/master
Commit: 62c9343658cec3ec36d326e7a03e0107e3e87bd3
Parents: c2b5add
Author: Daan Hoogland <da...@onecht.net>
Authored: Mon Jan 6 11:28:50 2014 +0100
Committer: Daan Hoogland <dh...@schubergphilis.com>
Committed: Mon Jan 6 11:28:50 2014 +0100
----------------------------------------------------------------------
utils/src/com/cloud/utils/net/NetUtils.java | 6 ++++++
utils/test/com/cloud/utils/net/NetUtilsTest.java | 1 +
2 files changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/62c93436/utils/src/com/cloud/utils/net/NetUtils.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/net/NetUtils.java b/utils/src/com/cloud/utils/net/NetUtils.java
index 905e518..becca37 100755
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java
@@ -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))
{
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/62c93436/utils/test/com/cloud/utils/net/NetUtilsTest.java
----------------------------------------------------------------------
diff --git a/utils/test/com/cloud/utils/net/NetUtilsTest.java b/utils/test/com/cloud/utils/net/NetUtilsTest.java
index 6d14593..600b69e 100644
--- a/utils/test/com/cloud/utils/net/NetUtilsTest.java
+++ b/utils/test/com/cloud/utils/net/NetUtilsTest.java
@@ -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));
}
}