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 2015/12/03 04:36:29 UTC

[4/9] tomee git commit: Deps required after exclude Cannot use body if getWriter fails

Deps required after exclude
Cannot use body if getWriter fails


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

Branch: refs/heads/tomee-7.0.0-M1
Commit: 87beb070daf3421515a74ca51502e136422a92d2
Parents: cf2e113
Author: AndyGee <an...@gmx.de>
Authored: Thu Dec 3 03:33:54 2015 +0100
Committer: AndyGee <an...@gmx.de>
Committed: Thu Dec 3 03:33:54 2015 +0100

----------------------------------------------------------------------
 container/openejb-core/pom.xml                               | 4 ++++
 pom.xml                                                      | 2 +-
 .../org/apache/openejb/server/httpd/HttpResponseImpl.java    | 8 ++++----
 3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/87beb070/container/openejb-core/pom.xml
----------------------------------------------------------------------
diff --git a/container/openejb-core/pom.xml b/container/openejb-core/pom.xml
index 3be1987..d133463 100644
--- a/container/openejb-core/pom.xml
+++ b/container/openejb-core/pom.xml
@@ -511,6 +511,10 @@
       <groupId>commons-cli</groupId>
       <artifactId>commons-cli</artifactId>
     </dependency>
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+    </dependency>
 
     <!-- ActiveMQ -->
     <dependency>

http://git-wip-us.apache.org/repos/asf/tomee/blob/87beb070/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index aaa2633..813b364 100644
--- a/pom.xml
+++ b/pom.xml
@@ -242,7 +242,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>3.2</version>
+          <version>3.3</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>

http://git-wip-us.apache.org/repos/asf/tomee/blob/87beb070/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponseImpl.java
----------------------------------------------------------------------
diff --git a/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponseImpl.java b/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponseImpl.java
index cb73dcf..f33ad34 100644
--- a/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponseImpl.java
+++ b/server/openejb-http/src/main/java/org/apache/openejb/server/httpd/HttpResponseImpl.java
@@ -585,11 +585,11 @@ public class HttpResponseImpl implements HttpResponse {
      */
     protected static HttpResponseImpl createError(String message, final Throwable t) {
         final HttpResponseImpl res = new HttpResponseImpl(500, "Internal Server Error", "text/html");
-        PrintWriter body = null;
+        final PrintWriter body;
         try {
             body = res.getWriter();
         } catch (final IOException e) { // impossible normally
-            // no-op
+            return res;
         }
 
         body.println("<html>");
@@ -644,11 +644,11 @@ public class HttpResponseImpl implements HttpResponse {
      */
     protected static HttpResponseImpl createForbidden(final String ip) {
         final HttpResponseImpl res = new HttpResponseImpl(403, "Forbidden", "text/html");
-        PrintWriter body = null;
+        final PrintWriter body;
         try {
             body = res.getWriter();
         } catch (final IOException e) { // normally impossible
-            // no-op
+            return res;
         }
 
         body.println("<html>");