Author: ebourg-guest Date: 2016-04-02 21:37:51 +0000 (Sat, 02 Apr 2016) New Revision: 19021
Added: trunk/velocity-tools/debian/patches/03_servlet_api_compatibility.diff Modified: trunk/velocity-tools/debian/changelog trunk/velocity-tools/debian/control trunk/velocity-tools/debian/patches/series trunk/velocity-tools/debian/rules Log: Transition to the Servlet API 3.0 (Closes: #801008) Modified: trunk/velocity-tools/debian/changelog =================================================================== --- trunk/velocity-tools/debian/changelog 2016-03-25 12:37:40 UTC (rev 19020) +++ trunk/velocity-tools/debian/changelog 2016-04-02 21:37:51 UTC (rev 19021) @@ -4,6 +4,7 @@ * Switch to debhelper level 9 * Removed the missing dependencies from the velocity-tools pom * Removed the dependency on libservlet2.5-java from libvelocity-tools-java + * Transition to the Servlet API 3.0 (Closes: #801008) -- Emmanuel Bourg <[email protected]> Mon, 16 Nov 2015 10:45:02 +0100 Modified: trunk/velocity-tools/debian/control =================================================================== --- trunk/velocity-tools/debian/control 2016-03-25 12:37:40 UTC (rev 19020) +++ trunk/velocity-tools/debian/control 2016-04-02 21:37:51 UTC (rev 19021) @@ -15,7 +15,7 @@ libcommons-validator-java, libdom4j-java, liboro-java, - libservlet2.5-java, + libservlet3.0-java, maven-repo-helper, velocity Standards-Version: 3.9.6 Added: trunk/velocity-tools/debian/patches/03_servlet_api_compatibility.diff =================================================================== --- trunk/velocity-tools/debian/patches/03_servlet_api_compatibility.diff (rev 0) +++ trunk/velocity-tools/debian/patches/03_servlet_api_compatibility.diff 2016-04-02 21:37:51 UTC (rev 19021) @@ -0,0 +1,22 @@ +Description: Fix the compatibility with the Servlet API 3.0 +Author: Emmanuel Bourg <[email protected]> +Forwarded: no +--- a/src/main/java/org/apache/velocity/tools/view/ParameterTool.java ++++ b/src/main/java/org/apache/velocity/tools/view/ParameterTool.java +@@ -195,13 +195,13 @@ + Array.getLength(value) == 1); + } + +- private Map<String,Object> expandSingletonArrays(Map<String,Object> original) ++ private Map<String,Object> expandSingletonArrays(Map<String,String[]> original) + { + Map<String,Object> expanded = new HashMap<String,Object>(original); + for (Map.Entry<String,Object> entry : expanded.entrySet()) + { +- Object value = entry.getValue(); +- if (isSingletonArray(value)) ++ String[] value = (String[]) entry.getValue(); ++ if (value != null && value.length == 1) + { + entry.setValue(Array.get(value, 0)); + } Modified: trunk/velocity-tools/debian/patches/series =================================================================== --- trunk/velocity-tools/debian/patches/series 2016-03-25 12:37:40 UTC (rev 19020) +++ trunk/velocity-tools/debian/patches/series 2016-04-02 21:37:51 UTC (rev 19021) @@ -1,2 +1,3 @@ 01_dont_copy_test_lib.diff 02_junit_45.diff +03_servlet_api_compatibility.diff Modified: trunk/velocity-tools/debian/rules =================================================================== --- trunk/velocity-tools/debian/rules 2016-03-25 12:37:40 UTC (rev 19020) +++ trunk/velocity-tools/debian/rules 2016-04-02 21:37:51 UTC (rev 19021) @@ -6,7 +6,7 @@ JAVA_HOME := /usr/lib/jvm/default-java ANT_HOME := /usr/share/ant -DEB_JARS := antlr commons-beanutils commons-collections3 commons-digester commons-lang commons-logging commons-validator oro servlet-api-2.5 jsp-api-2.1 velocity junit4 ant-junit dom4j +DEB_JARS := antlr commons-beanutils commons-collections3 commons-digester commons-lang commons-logging commons-validator oro servlet-api-3.0 jsp-api-2.2 velocity junit4 ant-junit dom4j DEB_ANT_BUILD_TARGET := jar.view jar.generic javadoc #DEB_ANT_CHECK_TARGET := test.generic _______________________________________________ pkg-java-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

