cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject [30/50] [abbrv] git commit: updated refs/heads/disk_io_throttling to 691bc9d
Date Tue, 18 Jun 2013 07:58:30 GMT
String instantiation is not needed

Removed a String instntiation, test case added

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/564013be
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/564013be
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/564013be

Branch: refs/heads/disk_io_throttling
Commit: 564013bec0d4356232d93ac52a3e44638578bff0
Parents: ce8ada0
Author: Laszlo Hornyak <laszlo.hornyak@gmail.com>
Authored: Sat Jun 8 21:39:52 2013 +0200
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Mon Jun 17 19:17:22 2013 +0100

----------------------------------------------------------------------
 utils/src/com/cloud/utils/net/NetUtils.java      | 2 +-
 utils/test/com/cloud/utils/net/NetUtilsTest.java | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/564013be/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 5c13454..6099379 100755
--- a/utils/src/com/cloud/utils/net/NetUtils.java
+++ b/utils/src/com/cloud/utils/net/NetUtils.java
@@ -257,7 +257,7 @@ public class NetUtils {
             return ipFromInetAddress(addr);
         }
 
-        return new String("127.0.0.1");
+        return "127.0.0.1";
     }
 
     public static String ipFromInetAddress(InetAddress addr) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/564013be/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 38fe21d..3cfc98f 100644
--- a/utils/test/com/cloud/utils/net/NetUtilsTest.java
+++ b/utils/test/com/cloud/utils/net/NetUtilsTest.java
@@ -168,4 +168,9 @@ public class NetUtilsTest extends TestCase {
     	newMac = NetUtils.generateMacOnIncrease(mac, 16);
     	assertTrue(newMac.equals("06:00:0f:00:45:67"));
     }
+
+    @Test
+    public void testGetLocalIPString() {
+        assertNotNull(NetUtils.getLocalIPString());
+    }
 }


Mime
View raw message