You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2014/11/28 16:40:30 UTC

tomee git commit: Brackets. Assert

Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x b15645db7 -> 2001d6346


Brackets. Assert


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/2001d634
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/2001d634
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/2001d634

Branch: refs/heads/tomee-1.7.x
Commit: 2001d6346d91fe92a3bee49d3b6176e814b48730
Parents: b15645d
Author: andygumbrecht <an...@apache.org>
Authored: Fri Nov 28 16:39:54 2014 +0100
Committer: andygumbrecht <an...@apache.org>
Committed: Fri Nov 28 16:39:54 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/openejb/util/NetworkUtil.java   | 8 ++++++--
 .../apache/openejb/server/httpd/CustomHttpMethodTest.java    | 2 ++
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/2001d634/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java b/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
index e65f69e..e5b191e 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
@@ -365,8 +365,12 @@ public final class NetworkUtil {
 
         @Override
         public boolean equals(final Object o) {
-            if (this == o) return true;
-            if (o == null || getClass() != o.getClass()) return false;
+            if (this == o) {
+                return true;
+            }
+            if (o == null || getClass() != o.getClass()) {
+                return false;
+            }
 
             final LastPort lastPort = (LastPort) o;
 

http://git-wip-us.apache.org/repos/asf/tomee/blob/2001d634/server/openejb-http/src/test/java/org/apache/openejb/server/httpd/CustomHttpMethodTest.java
----------------------------------------------------------------------
diff --git a/server/openejb-http/src/test/java/org/apache/openejb/server/httpd/CustomHttpMethodTest.java b/server/openejb-http/src/test/java/org/apache/openejb/server/httpd/CustomHttpMethodTest.java
index 0007803..16c2585 100644
--- a/server/openejb-http/src/test/java/org/apache/openejb/server/httpd/CustomHttpMethodTest.java
+++ b/server/openejb-http/src/test/java/org/apache/openejb/server/httpd/CustomHttpMethodTest.java
@@ -25,6 +25,7 @@ import org.apache.openejb.testing.EnableServices;
 import org.apache.openejb.testing.Module;
 import org.apache.openejb.testng.PropertiesBuilder;
 import org.apache.openejb.util.NetworkUtil;
+import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -57,6 +58,7 @@ public class CustomHttpMethodTest {
             final URL url = new URL("http://localhost:" + nextAvailablePort + "/custom");
             final HttpURLConnection connection = HttpURLConnection.class.cast(url.openConnection());
             connection.setRequestMethod("OPTIONS");
+            Assert.assertNotNull("Connection is null", connection);
             final InputStream inputStream = connection.getInputStream();
             IO.slurp(inputStream);
             assertEquals("OPTIONS", method.get());