cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-7077] Upgrading Servlet API version to 3.1
Date Mon, 10 Oct 2016 08:24:36 GMT
Repository: cxf
Updated Branches:
  refs/heads/master b06cafc07 -> 1116dff4e


[CXF-7077] Upgrading Servlet API version to 3.1


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1116dff4
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1116dff4
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1116dff4

Branch: refs/heads/master
Commit: 1116dff4ec9f06e2e69b040f5aa03779c0424c23
Parents: b06cafc
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Oct 10 09:24:20 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Oct 10 09:24:20 2016 +0100

----------------------------------------------------------------------
 osgi/itests-felix/pom.xml                       |  4 +--
 .../cxf/osgi/itests/NoAriesBlueprintTest.java   |  2 +-
 parent/pom.xml                                  | 11 +++----
 .../HttpServletRequestAdapter.java              | 33 ++++++++++++++++++++
 .../HttpServletResponseAdapter.java             | 16 ++++++++++
 rt/transports/http-undertow/pom.xml             |  4 +--
 .../atmosphere/DefaultProtocolInterceptor.java  | 11 +++++++
 .../jetty/WebSocketVirtualServletRequest.java   | 32 +++++++++++++++++++
 .../jetty/WebSocketVirtualServletResponse.java  | 19 +++++++++++
 systests/transports/pom.xml                     |  4 +--
 10 files changed, 123 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/osgi/itests-felix/pom.xml
----------------------------------------------------------------------
diff --git a/osgi/itests-felix/pom.xml b/osgi/itests-felix/pom.xml
index 1e012fc..76dc850 100644
--- a/osgi/itests-felix/pom.xml
+++ b/osgi/itests-felix/pom.xml
@@ -72,8 +72,8 @@
             <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <groupId>${cxf.servlet-api.group}</groupId>
+            <artifactId>${cxf.servlet-api.artifact}</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
----------------------------------------------------------------------
diff --git a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
index de3ed84..8f0360a 100644
--- a/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
+++ b/osgi/itests-felix/src/test/java/org/apache/cxf/osgi/itests/NoAriesBlueprintTest.java
@@ -66,7 +66,7 @@ public class NoAriesBlueprintTest extends OSGiTestSupport {
                 mvnBundle("org.apache.cxf", "cxf-rt-bindings-xml"),
                 mvnBundle("org.apache.cxf", "cxf-rt-bindings-soap"),
                 mvnBundle("org.apache.cxf", "cxf-rt-frontend-simple"),
-                mvnBundle("org.apache.geronimo.specs", "geronimo-servlet_3.0_spec"),
+                mvnBundle("javax.servlet", "javax.servlet-api"),
                 mvnBundle("org.apache.cxf", "cxf-rt-transports-http"),
                 mvnBundle("org.apache.cxf", "cxf-rt-frontend-jaxws"),
                 junitBundles()

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 1d39542..3630054 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -105,8 +105,6 @@
         <cxf.geronimo.j2ee.management.version>1.0.1</cxf.geronimo.j2ee.management.version>
         <cxf.geronimo.jpa.version>1.0</cxf.geronimo.jpa.version>
         <cxf.openjpa.version>2.4.1</cxf.openjpa.version>
-        <cxf.geronimo.servlet.version>1.0</cxf.geronimo.servlet.version>
-        <cxf.geronimo.servlet25.version>1.2</cxf.geronimo.servlet25.version>
         <cxf.geronimo.transaction.version>1.1.1</cxf.geronimo.transaction.version>
         <cxf.jasypt.bundle.version>1.9.0_1</cxf.jasypt.bundle.version>
         <cxf.javassist.version>3.19.0-GA</cxf.javassist.version>
@@ -140,9 +138,10 @@
         <cxf.opensaml.osgi.version.range>[3.1,4)</cxf.opensaml.osgi.version.range>
         <cxf.rhino.version>1.7R2</cxf.rhino.version>
         <cxf.reflections.bundle.version>0.9.10_3</cxf.reflections.bundle.version>
-        <cxf.servlet-api.group>org.apache.geronimo.specs</cxf.servlet-api.group>
-        <cxf.servlet-api.artifact>geronimo-servlet_3.0_spec</cxf.servlet-api.artifact>
-        <cxf.servlet-api.version>1.0</cxf.servlet-api.version>
+        <cxf.servlet-api.group>javax.servlet</cxf.servlet-api.group>
+        <cxf.servlet-api.artifact>javax.servlet-api</cxf.servlet-api.artifact>
+        <cxf.servlet-api.version>3.1.0</cxf.servlet-api.version>
+        <cxf.geronimo.servlet25.version>1.2</cxf.geronimo.servlet25.version>
         <cxf.servlet-api-2.5.artifact>geronimo-servlet_2.5_spec</cxf.servlet-api-2.5.artifact>
         <cxf.servlet-api-2.5.version>1.1.2</cxf.servlet-api-2.5.version>
         <cxf.slf4j.version>1.7.21</cxf.slf4j.version>
@@ -1559,7 +1558,7 @@
                 <version>${cxf.servlet-api.version}</version>
             </dependency>
             <dependency>
-                <groupId>${cxf.servlet-api.group}</groupId>
+                <groupId>org.apache.geronimo.specs</groupId>
                 <artifactId>${cxf.servlet-api-2.5.artifact}</artifactId>
                 <version>${cxf.servlet-api-2.5.version}</version>
             </dependency>

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
index 6ffcd71..b4cbcf2 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
@@ -36,6 +36,7 @@ import java.util.Map;
 
 import javax.servlet.AsyncContext;
 import javax.servlet.DispatcherType;
+import javax.servlet.ReadListener;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
@@ -46,6 +47,7 @@ import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpUpgradeHandler;
 import javax.servlet.http.Part;
 import javax.xml.ws.spi.http.HttpContext;
 import javax.xml.ws.spi.http.HttpExchange;
@@ -410,5 +412,36 @@ class HttpServletRequestAdapter implements HttpServletRequest {
         public int read() throws IOException {
             return delegate.read();
         }
+
+        @Override
+        public boolean isFinished() {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public boolean isReady() {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void setReadListener(ReadListener arg0) {
+            throw new UnsupportedOperationException();
+            
+        }
+    }
+
+    @Override
+    public long getContentLengthLong() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String changeSessionId() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public <T extends HttpUpgradeHandler> T upgrade(Class<T> cls) throws IOException,
ServletException {
+        throw new UnsupportedOperationException();
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
index c4dd62f..df9f640 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
@@ -30,6 +30,7 @@ import java.util.List;
 import java.util.Locale;
 
 import javax.servlet.ServletOutputStream;
+import javax.servlet.WriteListener;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 import javax.xml.ws.spi.http.HttpExchange;
@@ -241,5 +242,20 @@ class HttpServletResponseAdapter implements HttpServletResponse {
         public void flush() throws IOException {
             delegate.flush();
         }
+
+        @Override
+        public boolean isReady() {
+            throw new UnsupportedOperationException();
+        }
+
+        @Override
+        public void setWriteListener(WriteListener arg0) {
+            throw new UnsupportedOperationException();
+        }
+    }
+
+    @Override
+    public void setContentLengthLong(long arg0) {
+        throw new UnsupportedOperationException();
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/rt/transports/http-undertow/pom.xml
----------------------------------------------------------------------
diff --git a/rt/transports/http-undertow/pom.xml b/rt/transports/http-undertow/pom.xml
index 14b39a0..2c902db 100644
--- a/rt/transports/http-undertow/pom.xml
+++ b/rt/transports/http-undertow/pom.xml
@@ -88,8 +88,8 @@
             <version>1.3.7.Final</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <groupId>${cxf.servlet-api.group}</groupId>
+            <artifactId>${cxf.servlet-api.artifact}</artifactId>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
index 02e0863..9646fd6 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptor.java
@@ -29,6 +29,7 @@ import java.util.logging.Logger;
 import java.util.regex.Pattern;
 
 import javax.servlet.ServletOutputStream;
+import javax.servlet.WriteListener;
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.cxf.common.logging.LogUtils;
@@ -427,6 +428,16 @@ public class DefaultProtocolInterceptor extends AtmosphereInterceptorAdapter
{
             public void write(byte[] b) throws IOException {
                 getOut().write(b);
             }
+
+            @Override
+            public boolean isReady() {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public void setWriteListener(WriteListener arg0) {
+                throw new UnsupportedOperationException();
+            }
         }
 
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletRequest.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletRequest.java
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletRequest.java
index 1adcaa6..07d1a05 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletRequest.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletRequest.java
@@ -37,6 +37,7 @@ import java.util.logging.Logger;
 
 import javax.servlet.AsyncContext;
 import javax.servlet.DispatcherType;
+import javax.servlet.ReadListener;
 import javax.servlet.RequestDispatcher;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
@@ -47,6 +48,7 @@ import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
+import javax.servlet.http.HttpUpgradeHandler;
 import javax.servlet.http.Part;
 
 import org.apache.cxf.common.logging.LogUtils;
@@ -139,6 +141,21 @@ public class WebSocketVirtualServletRequest implements HttpServletRequest
{
             public int read(byte[] b, int off, int len) throws IOException {
                 return in.read(b, off, len);
             }
+
+            @Override
+            public boolean isFinished() {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public boolean isReady() {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public void setReadListener(ReadListener arg0) {
+                throw new UnsupportedOperationException();
+            }
         };
     }
 
@@ -524,4 +541,19 @@ public class WebSocketVirtualServletRequest implements HttpServletRequest
{
     public void logout() throws ServletException {
         LOG.log(Level.FINE, "logout");
     }
+
+    @Override
+    public long getContentLengthLong() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public String changeSessionId() {
+        throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public <T extends HttpUpgradeHandler> T upgrade(Class<T> arg0) throws IOException,
ServletException {
+        throw new UnsupportedOperationException();
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletResponse.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletResponse.java
b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletResponse.java
index b9908b1..bbce9e8 100644
--- a/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletResponse.java
+++ b/rt/transports/websocket/src/main/java/org/apache/cxf/transport/websocket/jetty/WebSocketVirtualServletResponse.java
@@ -30,6 +30,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.servlet.ServletOutputStream;
+import javax.servlet.WriteListener;
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletResponse;
 
@@ -321,6 +322,7 @@ public class WebSocketVirtualServletResponse implements HttpServletResponse
{
         // the things to consider :
         // - provide a size limit if we are use this buffering
         // - add a chunking mode in the cxf websocket's binding.
+        //CHECKSTYLE:OFF
         return new ServletOutputStream() {
             private InternalByteArrayOutputStream buffer = new InternalByteArrayOutputStream();
 
@@ -358,7 +360,18 @@ public class WebSocketVirtualServletResponse implements HttpServletResponse
{
                 }
                 super.close();
             }
+
+            @Override
+            public boolean isReady() {
+                throw new UnsupportedOperationException();
+            }
+
+            @Override
+            public void setWriteListener(WriteListener arg0) {
+                throw new UnsupportedOperationException();
+            }
         };
+        //CHECKSTYLE:ON
     }
 
     private static class InternalByteArrayOutputStream extends ByteArrayOutputStream {
@@ -366,4 +379,10 @@ public class WebSocketVirtualServletResponse implements HttpServletResponse
{
             return buf;
         }
     }
+
+    @Override
+    public void setContentLengthLong(long arg0) {
+        throw new UnsupportedOperationException();
+        
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1116dff4/systests/transports/pom.xml
----------------------------------------------------------------------
diff --git a/systests/transports/pom.xml b/systests/transports/pom.xml
index 8d03faa..ab7a6cd 100644
--- a/systests/transports/pom.xml
+++ b/systests/transports/pom.xml
@@ -230,8 +230,8 @@
         </dependency>
         <!-- make http://java.sun.com/dtd/web-app_2_3.dtd et al locally available during
the tests -->
         <dependency>
-            <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-servlet_3.0_spec</artifactId>
+            <groupId>${cxf.servlet-api.group}</groupId>
+            <artifactId>${cxf.servlet-api.artifact}</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>


Mime
View raw message