[mondrian] 03/05: Transition to the Servlet API 3.1 (Closes: #801033)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Jun 21 13:29:44 UTC 2016


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

ebourg-guest pushed a commit to branch master
in repository mondrian.

commit 2de744c2a203b8ac363af81db490b4a1860ee7bf
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Tue Jun 21 15:20:28 2016 +0200

    Transition to the Servlet API 3.1 (Closes: #801033)
---
 debian/changelog                                 |   1 +
 debian/control                                   |   6 +-
 debian/patches/05_servlet_api_25.diff            |  17 --
 debian/patches/07_javadoc_links.diff             |   4 +-
 debian/patches/10_servlet_api_compatibility.diff | 248 +++++++++++++++++++++++
 debian/patches/series                            |   2 +-
 debian/rules                                     |   4 +-
 7 files changed, 257 insertions(+), 25 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1a9dd2c..76fef19 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 mondrian (1:3.11.0.1-2) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Transition to the Servlet API 3.1 (Closes: #801033)
   * Standards-Version updated to 3.9.7 (no changes)
   * Use secure Vcs-* URLs
 
diff --git a/debian/control b/debian/control
index 3726c8c..303e468 100644
--- a/debian/control
+++ b/debian/control
@@ -22,8 +22,8 @@ Build-Depends-Indep: cup (>= 0.11a+20060608),
                      liblog4j1.2-java,
                      libolap4j-java (>= 1.2),
                      libolap4j-java-doc,
-                     libservlet2.5-java,
-                     libservlet2.5-java-doc,
+                     libservlet3.1-java,
+                     libservlet3.1-java-doc,
                      libxalan2-java,
                      libxerces2-java,
                      libxmlunit-java
@@ -57,7 +57,7 @@ Recommends: default-jdk-doc,
             junit-doc,
             libeigenbase-resgen-java-doc,
             libolap4j-java-doc,
-            libservlet2.5-java-doc
+            libservlet3.1-java-doc
 Suggests: libmondrian-java
 Description: OLAP server written in Java - documentation
  Mondrian is an OLAP server written in Java. It enables to interactively
diff --git a/debian/patches/05_servlet_api_25.diff b/debian/patches/05_servlet_api_25.diff
deleted file mode 100644
index 3526d85..0000000
--- a/debian/patches/05_servlet_api_25.diff
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: Compatibility fix with Servlet 2.5 API
-Author: Damien Raude-Morvan <drazzib at debian.org>
-Last-Update: 2009-12-13
-Forwarded: no
---- a/src/main/mondrian/tui/MockServletContext.java
-+++ b/src/main/mondrian/tui/MockServletContext.java
-@@ -56,6 +56,10 @@
-         return null;
-     }
- 
-+    public String getContextPath() {
-+        return null;
-+    }
-+
-     /**
-      * Returns the major version of the Java Servlet API that this servlet
-      * container supports.
diff --git a/debian/patches/07_javadoc_links.diff b/debian/patches/07_javadoc_links.diff
index 82b6f3c..0baf4f9 100644
--- a/debian/patches/07_javadoc_links.diff
+++ b/debian/patches/07_javadoc_links.diff
@@ -19,7 +19,7 @@ Forwarded: not-needed
 +      <link href="/usr/share/doc/default-jdk-doc/api/"/>
 +      <link href="/usr/share/doc/libolap4j-java/api/"/>
 +      <link href="/usr/share/doc/junit-doc/doc/api/"/>
-+      <link href="/usr/share/doc/libservlet2.5-java/api/"/>
++      <link href="/usr/share/doc/libservlet3.1-java/api/"/>
 +      <link href="/usr/share/doc/libeigenbase-resgen-java/api/"/>
      </javadoc>
      <copy file="${java.dir}/mondrian/olap/Mondrian.xml"
@@ -37,7 +37,7 @@ Forwarded: not-needed
 +      <link href="/usr/share/doc/default-jdk-doc/api/"/>
 +      <link href="/usr/share/doc/libolap4j-java/api/"/>
 +      <link href="/usr/share/doc/junit-doc/doc/api/"/>
-+      <link href="/usr/share/doc/libservlet2.5-java/api/"/>
++      <link href="/usr/share/doc/libservlet3.1-java/api/"/>
 +      <link href="/usr/share/doc/libeigenbase-resgen-java/api/"/>
        <doclet
            name="ydoc.doclets.YStandard"
diff --git a/debian/patches/10_servlet_api_compatibility.diff b/debian/patches/10_servlet_api_compatibility.diff
new file mode 100644
index 0000000..36ba297
--- /dev/null
+++ b/debian/patches/10_servlet_api_compatibility.diff
@@ -0,0 +1,248 @@
+Description: Fixes the compatibility with the latest version of the Servlet API in Debian
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/main/mondrian/tui/MockHttpServletRequest.java
++++ b/src/main/mondrian/tui/MockHttpServletRequest.java
+@@ -89,6 +89,17 @@
+         public int read() throws IOException {
+             return stream.read();
+         }
++
++        public boolean isFinished() {
++            return stream.available() <= 0;
++        }
++
++        public boolean isReady() {
++            return true;
++        }
++
++        public void setReadListener(ReadListener listener) {
++        }
+     }
+ 
+ 
+@@ -855,7 +866,65 @@
+         this.bodyContent = bodyContent;
+     }
+ 
++    public String changeSessionId() {
++        return null;
++    }
++
++    public boolean authenticate(HttpServletResponse response) throws IOException, ServletException {
++        return false;
++    }
++
++    public void login(String username, String password) throws ServletException {
++
++    }
++
++    public void logout() throws ServletException {
++
++    }
++
++    public Collection<Part> getParts() throws IOException, ServletException {
++        return null;
++    }
++
++    public Part getPart(String name) throws IOException, ServletException {
++        return null;
++    }
++
++    public <T extends HttpUpgradeHandler> T upgrade(Class<T> handlerClass) throws IOException, ServletException {
++        return null;
++    }
++
++    public long getContentLengthLong() {
++        return 0;
++    }
++
++    public ServletContext getServletContext() {
++        return null;
++    }
++
++    public AsyncContext startAsync() throws IllegalStateException {
++        return null;
++    }
+ 
++    public AsyncContext startAsync(ServletRequest servletRequest, ServletResponse servletResponse) throws IllegalStateException {
++        return null;
++    }
++
++    public boolean isAsyncStarted() {
++        return false;
++    }
++
++    public boolean isAsyncSupported() {
++        return false;
++    }
++
++    public AsyncContext getAsyncContext() {
++        return null;
++    }
++
++    public DispatcherType getDispatcherType() {
++        return null;
++    }
+ }
+ 
+ // End MockHttpServletRequest.java
+--- a/src/main/mondrian/tui/MockHttpServletResponse.java
++++ b/src/main/mondrian/tui/MockHttpServletResponse.java
+@@ -74,6 +74,13 @@
+         public void clearContent() {
+             buffer = new ByteArrayOutputStream();
+         }
++
++        public boolean isReady() {
++            return true;
++        }
++
++        public void setWriteListener(javax.servlet.WriteListener listener) {
++        }
+     }
+ 
+ 
+@@ -454,7 +461,21 @@
+         return s;
+     }
+ 
++    public int getStatus() {
++        return getStatusCode();
++    }
+ 
++    public Collection<String> getHeaders(String name) {
++        return headers.get(name);
++    }
++
++    public Collection<String> getHeaderNames() {
++        return headers.keySet();
++    }
++
++    public void setContentLengthLong(long len) {
++        setHeader("Content-Length", Long.toString(len));
++    }
+ }
+ 
+ // End MockHttpServletResponse.java
+--- a/src/main/mondrian/tui/MockServletContext.java
++++ b/src/main/mondrian/tui/MockServletContext.java
+@@ -289,6 +289,118 @@
+             this.parameters.setProperty(name, value);
+         }
+     }
++
++    public String getContextPath() {
++        return null;
++    }
++
++    public int getEffectiveMajorVersion() {
++        return 0;
++    }
++
++    public int getEffectiveMinorVersion() {
++        return 0;
++    }
++
++    public boolean setInitParameter(String name, String value) {
++        return false;
++    }
++
++    public ServletRegistration.Dynamic addServlet(String servletName, String className) {
++        return null;
++    }
++
++    public ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
++        return null;
++    }
++
++    public ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) {
++        return null;
++    }
++
++    public <T extends Servlet> T createServlet(Class<T> clazz) throws ServletException {
++        return null;
++    }
++
++    public ServletRegistration getServletRegistration(String servletName) {
++        return null;
++    }
++
++    public Map<String, ? extends ServletRegistration> getServletRegistrations() {
++        return null;
++    }
++
++    public FilterRegistration.Dynamic addFilter(String filterName, String className) {
++        return null;
++    }
++
++    public FilterRegistration.Dynamic addFilter(String filterName, Filter filter) {
++        return null;
++    }
++
++    public FilterRegistration.Dynamic addFilter(String filterName, Class<? extends Filter> filterClass) {
++        return null;
++    }
++
++    public <T extends Filter> T createFilter(Class<T> clazz) throws ServletException {
++        return null;
++    }
++
++    public FilterRegistration getFilterRegistration(String filterName) {
++        return null;
++    }
++
++    public Map<String, ? extends FilterRegistration> getFilterRegistrations() {
++        return null;
++    }
++
++    public SessionCookieConfig getSessionCookieConfig() {
++        return null;
++    }
++
++    public void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes) {
++
++    }
++
++    public Set<SessionTrackingMode> getDefaultSessionTrackingModes() {
++        return null;
++    }
++
++    public Set<SessionTrackingMode> getEffectiveSessionTrackingModes() {
++        return null;
++    }
++
++    public void addListener(String className) {
++
++    }
++
++    public <T extends EventListener> void addListener(T t) {
++
++    }
++
++    public void addListener(Class<? extends EventListener> listenerClass) {
++
++    }
++
++    public <T extends EventListener> T createListener(Class<T> clazz) throws ServletException {
++        return null;
++    }
++
++    public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor() {
++        return null;
++    }
++
++    public ClassLoader getClassLoader() {
++        return null;
++    }
++
++    public void declareRoles(String... roleNames) {
++
++    }
++
++    public String getVirtualServerName() {
++        return null;
++    }
+ }
+ 
+ // End MockServletContext.java
diff --git a/debian/patches/series b/debian/patches/series
index c8851ba..3a9b323 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,6 @@
 01_disable_ivy.diff
 02_use_debian_cup11a.diff
-05_servlet_api_25.diff
 07_javadoc_links.diff
 08_remove_javadoc_footer.diff
 09_reproducible_javadoc.diff
+10_servlet_api_compatibility.diff
diff --git a/debian/rules b/debian/rules
index f661b26..23bcb5f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,10 +24,10 @@ pre-build::
 	ln -s -f /usr/share/java/eigenbase-xom.jar lib/eigenbase-xom.jar
 	ln -s -f /usr/share/java/javacc.jar lib/javacc.jar
 	ln -s -f /usr/share/java/jaxp-1.4.jar lib/jaxp.jar
-	ln -s -f /usr/share/java/jsp-api-2.1.jar lib/jsp-api.jar
+	ln -s -f /usr/share/java/jsp-api-2.3.jar lib/jsp-api.jar
 	ln -s -f /usr/share/java/log4j-1.2.jar lib/log4j.jar
 	ln -s -f /usr/share/java/olap4j.jar lib/olap4j.jar
-	ln -s -f /usr/share/java/servlet-api-2.5.jar lib/servlet-api.jar
+	ln -s -f /usr/share/java/servlet-api-3.1.jar lib/servlet-api.jar
 	ln -s -f /usr/share/java/xalan2.jar lib/xalan2.jar
 	ln -s -f /usr/share/java/xercesImpl.jar lib/xerces.jar
 

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



More information about the pkg-java-commits mailing list