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/02 21:25:16 UTC
git commit: updated refs/heads/4.3 to 61d4815
Updated Branches:
refs/heads/4.3 7c8ef7836 -> 61d48154f
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/61d48154
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/61d48154
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/61d48154
Branch: refs/heads/4.3
Commit: 61d48154fd4613c0f19210cd69d752bf6abe0cab
Parents: 7c8ef78
Author: Daan Hoogland <da...@onecht.net>
Authored: Thu Jan 2 21:24:32 2014 +0100
Committer: Daan Hoogland <da...@onecht.net>
Committed: Thu Jan 2 21:24:32 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/61d48154/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 1903b29..266a5d1 100755
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java
@@ -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))
{
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/61d48154/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 45a9334..b049516 100644
--- a/utils/test/com/cloud/utils/net/NetUtilsTest.java
+++ b/utils/test/com/cloud/utils/net/NetUtilsTest.java
@@ -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));
}
}