[jackrabbit] 07/08: Add servlet-API-3.1.patch

Markus Koschany apo at moszumanska.debian.org
Fri Jul 15 06:24:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

apo pushed a commit to branch master
in repository jackrabbit.

commit 1597b336dc96f6b898b25b993f56c2d8554e27f9
Author: Markus Koschany <apo at debian.org>
Date:   Fri Jul 15 07:11:13 2016 +0200

    Add servlet-API-3.1.patch
---
 debian/patches/series                |   1 +
 debian/patches/servlet-API-3.1.patch | 216 +++++++++++++++++++++++++++++++++++
 2 files changed, 217 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
index 7ae045a..2cce724 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 servlet_api_25.diff
+servlet-API-3.1.patch
diff --git a/debian/patches/servlet-API-3.1.patch b/debian/patches/servlet-API-3.1.patch
new file mode 100644
index 0000000..c8e4236
--- /dev/null
+++ b/debian/patches/servlet-API-3.1.patch
@@ -0,0 +1,216 @@
+From: Markus Koschany <apo at debian.org>
+Date: Fri, 15 Jul 2016 07:10:56 +0200
+Subject: servlet API 3.1
+
+---
+ .../jackrabbit/webdav/WebdavRequestImpl.java       | 85 ++++++++++++++++++++--
+ .../jackrabbit/webdav/WebdavResponseImpl.java      | 30 ++++++++
+ 2 files changed, 109 insertions(+), 6 deletions(-)
+
+diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
+index 05dafa5..11a5e27 100644
+--- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
++++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavRequestImpl.java
+@@ -21,21 +21,32 @@ import java.io.BufferedReader;
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.UnsupportedEncodingException;
++import java.lang.IllegalStateException;
+ import java.net.URI;
+ import java.net.URISyntaxException;
+ import java.security.Principal;
+ import java.util.ArrayList;
++import java.util.Collection;
+ import java.util.Enumeration;
+ import java.util.Iterator;
+ import java.util.List;
+ import java.util.Locale;
+ import java.util.Map;
+ 
++import javax.servlet.AsyncContext;
++import javax.servlet.DispatcherType;
+ import javax.servlet.RequestDispatcher;
++import javax.servlet.ServletContext;
++import javax.servlet.ServletException;
+ import javax.servlet.ServletInputStream;
++import javax.servlet.ServletRequest;
++import javax.servlet.ServletResponse;
+ import javax.servlet.http.Cookie;
+ import javax.servlet.http.HttpServletRequest;
++import javax.servlet.http.HttpServletResponse;
++import javax.servlet.http.HttpUpgradeHandler;
+ import javax.servlet.http.HttpSession;
++import javax.servlet.http.Part;
+ import javax.xml.parsers.ParserConfigurationException;
+ 
+ import org.apache.jackrabbit.webdav.bind.BindInfo;
+@@ -822,11 +833,11 @@ public class WebdavRequestImpl implements WebdavRequest, DavConstants {
+         return httpRequest.getHeader(s);
+     }
+ 
+-    public Enumeration<?> getHeaders(String s) {
++    public Enumeration<String> getHeaders(String s) {
+         return httpRequest.getHeaders(s);
+     }
+ 
+-    public Enumeration<?> getHeaderNames() {
++    public Enumeration<String> getHeaderNames() {
+         return httpRequest.getHeaderNames();
+     }
+ 
+@@ -910,7 +921,7 @@ public class WebdavRequestImpl implements WebdavRequest, DavConstants {
+         return httpRequest.getAttribute(s);
+     }
+ 
+-    public Enumeration<?> getAttributeNames() {
++    public Enumeration<String> getAttributeNames() {
+         return httpRequest.getAttributeNames();
+     }
+ 
+@@ -938,7 +949,7 @@ public class WebdavRequestImpl implements WebdavRequest, DavConstants {
+         return httpRequest.getParameter(s);
+     }
+ 
+-    public Enumeration<?> getParameterNames() {
++    public Enumeration<String> getParameterNames() {
+         return httpRequest.getParameterNames();
+     }
+ 
+@@ -946,7 +957,7 @@ public class WebdavRequestImpl implements WebdavRequest, DavConstants {
+         return httpRequest.getParameterValues(s);
+     }
+ 
+-    public Map<?,?> getParameterMap() {
++    public Map<String,String[]> getParameterMap() {
+         return httpRequest.getParameterMap();
+     }
+ 
+@@ -990,7 +1001,7 @@ public class WebdavRequestImpl implements WebdavRequest, DavConstants {
+         return httpRequest.getLocale();
+     }
+ 
+-    public Enumeration<?> getLocales() {
++    public Enumeration<Locale> getLocales() {
+         return httpRequest.getLocales();
+     }
+ 
+@@ -1022,4 +1033,66 @@ public class WebdavRequestImpl implements WebdavRequest, DavConstants {
+     public String getLocalAddr() {
+        return httpRequest.getLocalAddr();
+     }
++
++    //---< servlet 3.1 >---
++    public Part getPart(String name) throws IOException, IllegalStateException, ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public Collection<Part> getParts() throws IOException, IllegalStateException, ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public void logout() throws ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public void login(String username, String password) throws ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public DispatcherType getDispatcherType() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public AsyncContext getAsyncContext() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public boolean isAsyncSupported() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public boolean isAsyncStarted() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public AsyncContext startAsync() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public ServletContext getServletContext() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public <T extends HttpUpgradeHandler> T upgrade(java.lang.Class<T> httpUpgradeHandlerClass) throws java.io.IOException, ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public String changeSessionId() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public long getContentLengthLong() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
+ }
++
+diff --git a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
+index 23e6a66..e004f23 100644
+--- a/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
++++ b/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/WebdavResponseImpl.java
+@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
+ import org.w3c.dom.Document;
+ import org.xml.sax.SAXException;
+ 
++import javax.servlet.ServletException;
+ import javax.servlet.ServletOutputStream;
+ import javax.servlet.http.Cookie;
+ import javax.servlet.http.HttpServletResponse;
+@@ -42,6 +43,7 @@ import java.io.IOException;
+ import java.io.OutputStreamWriter;
+ import java.io.PrintWriter;
+ import java.io.Writer;
++import java.util.Collection;
+ import java.util.Locale;
+ 
+ /**
+@@ -319,4 +321,32 @@ public class WebdavResponseImpl implements WebdavResponse {
+     public String getContentType() {
+        return httpResponse.getContentType();
+     }
++
++    //---< servlet 3.0 >---
++    public Collection<String> getHeaderNames() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public String getHeader(String name) {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public Collection<String> getHeaders(String name) {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public void logout() throws ServletException {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public int getStatus() {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++    public void setContentLengthLong(long length) {
++        throw new UnsupportedOperationException("Not supported.");
++    }
++
++
++
+ }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jackrabbit.git



More information about the pkg-java-commits mailing list