port to commons-lang3
This commit is contained in:
parent
fbe4ec2b5c
commit
675ae1d0a1
@ -1,32 +1,31 @@
|
||||
From 1d2f89cb3e954b943751fa8dd587fdb404eb9338 Mon Sep 17 00:00:00 2001
|
||||
From 15c0c0edebc8980dfa3d64f507962f7b822d0fdc Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||
Date: Mon, 21 Feb 2011 15:53:34 +0100
|
||||
Subject: [PATCH 1/3] Remove avalon-logkit
|
||||
Date: Thu, 30 Jul 2020 15:35:08 +0200
|
||||
Subject: [PATCH 0/8] Remove avalon-logkit
|
||||
|
||||
we don't have it packaged so change defaults and remove it from pom.xml
|
||||
---
|
||||
pom.xml | 6 ------
|
||||
.../velocity/runtime/defaults/velocity.properties | 4 ++--
|
||||
.../apache/velocity/runtime/log/LogManager.java | 2 +-
|
||||
pom.xml | 6 ------
|
||||
.../apache/velocity/runtime/defaults/velocity.properties | 4 ++--
|
||||
src/java/org/apache/velocity/runtime/log/LogManager.java | 2 +-
|
||||
3 files changed, 3 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 77a8e38..f453208 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -197,12 +197,6 @@
|
||||
@@ -196,12 +196,6 @@
|
||||
<version>2.3</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <dependency>
|
||||
- <groupId>logkit</groupId>
|
||||
- <artifactId>logkit</artifactId>
|
||||
- <version>2.0</version>
|
||||
- <scope>provided</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.6</version>
|
||||
diff --git a/src/java/org/apache/velocity/runtime/defaults/velocity.properties b/src/java/org/apache/velocity/runtime/defaults/velocity.properties
|
||||
index 750a59a..7fac119 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/defaults/velocity.properties
|
||||
@ -58,5 +57,5 @@ index 19d1016..97dceef 100644
|
||||
* convenience - so we use whichever we works first.
|
||||
*/
|
||||
--
|
||||
1.7.4
|
||||
2.26.2
|
||||
|
@ -1,14 +1,14 @@
|
||||
From cec42bf7ae8b4b72850c3cdea74a07603f11786f Mon Sep 17 00:00:00 2001
|
||||
From b12e4b19a88efce7559514c9dae686b177ecb347 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Wed, 18 Jun 2014 07:25:12 +0200
|
||||
Subject: [PATCH 4/4] Use log4j 1.2.17
|
||||
Date: Thu, 30 Jul 2020 15:36:29 +0200
|
||||
Subject: [PATCH 1/8] Use log4j 1.2.17
|
||||
|
||||
---
|
||||
pom.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index e35d72d..c8d48fd 100644
|
||||
index f453208..8cb5d3f 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -187,7 +187,7 @@
|
||||
@ -21,5 +21,5 @@ index e35d72d..c8d48fd 100644
|
||||
</dependency>
|
||||
<dependency>
|
||||
--
|
||||
1.9.3
|
||||
2.26.2
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 813085c72e9906a53bec5954bcce7305a7c320d1 Mon Sep 17 00:00:00 2001
|
||||
From d7c3b400786c04eacc0065acccdad6b40ccbc35b Mon Sep 17 00:00:00 2001
|
||||
From: Stanislav Ochotnicky <sochotnicky@redhat.com>
|
||||
Date: Mon, 21 Feb 2011 17:58:39 +0100
|
||||
Subject: [PATCH 3/3] Use system jars
|
||||
Date: Thu, 30 Jul 2020 15:36:52 +0200
|
||||
Subject: [PATCH 2/8] Use system jars
|
||||
|
||||
---
|
||||
build/build.xml | 56 +++++++++++----------------------------------------
|
||||
build/testcases.xml | 6 -----
|
||||
build/build.xml | 56 ++++++++++-----------------------------------
|
||||
build/testcases.xml | 6 -----
|
||||
2 files changed, 12 insertions(+), 50 deletions(-)
|
||||
|
||||
diff --git a/build/build.xml b/build/build.xml
|
||||
@ -193,5 +193,5 @@ index 06bb36e..f3749bc 100644
|
||||
<pathelement location="${build.test.dest}"/>
|
||||
</path>
|
||||
--
|
||||
1.7.4
|
||||
2.26.2
|
||||
|
33
0003-JDBC-41-compat.patch
Normal file
33
0003-JDBC-41-compat.patch
Normal file
@ -0,0 +1,33 @@
|
||||
From 716435f7bda16e053e7d3166b6ef3d93a047d2c2 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Thu, 30 Jul 2020 15:37:21 +0200
|
||||
Subject: [PATCH 3/8] JDBC 41 compat
|
||||
|
||||
---
|
||||
src/test/org/apache/velocity/test/sql/HsqlDataSource.java | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/test/org/apache/velocity/test/sql/HsqlDataSource.java b/src/test/org/apache/velocity/test/sql/HsqlDataSource.java
|
||||
index 547928b..360a6d4 100644
|
||||
--- a/src/test/org/apache/velocity/test/sql/HsqlDataSource.java
|
||||
+++ b/src/test/org/apache/velocity/test/sql/HsqlDataSource.java
|
||||
@@ -23,6 +23,7 @@ import java.io.PrintWriter;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
+import java.sql.SQLFeatureNotSupportedException;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -73,5 +74,8 @@ public class HsqlDataSource implements DataSource {
|
||||
public Object unwrap(final Class iface) throws SQLException {
|
||||
throw new SQLException("Not implemented");
|
||||
}
|
||||
+ public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
+ throw new SQLFeatureNotSupportedException("getParentLogger() not supported");
|
||||
+ }
|
||||
|
||||
}
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,13 +1,13 @@
|
||||
From 8a9344f55d74a5b809051ae144b3c028499fec0d Mon Sep 17 00:00:00 2001
|
||||
From 55c4e510ccd1483ec7e1a15fff366753b6ada3ac Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Sat, 27 Sep 2013 10:53:46 +0200
|
||||
Subject: [PATCH] Don't use Werken XPath
|
||||
Date: Thu, 30 Jul 2020 15:37:49 +0200
|
||||
Subject: [PATCH 4/8] Do not use Werken XPath
|
||||
|
||||
---
|
||||
src/java/org/apache/velocity/anakia/AnakiaElement.java | 7 +++++--
|
||||
src/java/org/apache/velocity/anakia/NodeList.java | 6 ++++--
|
||||
src/java/org/apache/velocity/anakia/XPathCache.java | 9 ++++++---
|
||||
src/java/org/apache/velocity/anakia/XPathTool.java | 16 ++++++++++------
|
||||
.../apache/velocity/anakia/AnakiaElement.java | 7 +++++--
|
||||
.../org/apache/velocity/anakia/NodeList.java | 6 ++++--
|
||||
.../org/apache/velocity/anakia/XPathCache.java | 9 ++++++---
|
||||
.../org/apache/velocity/anakia/XPathTool.java | 16 ++++++++++------
|
||||
4 files changed, 25 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/java/org/apache/velocity/anakia/AnakiaElement.java b/src/java/org/apache/velocity/anakia/AnakiaElement.java
|
||||
@ -161,5 +161,5 @@ index c9e6178..f85d2c1 100644
|
||||
}
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
2.26.2
|
||||
|
@ -1,19 +0,0 @@
|
||||
--- a/src/test/org/apache/velocity/test/sql/HsqlDataSource.java 2012-02-15 19:49:20.202936454 -0500
|
||||
+++ b/src/test/org/apache/velocity/test/sql/HsqlDataSource.java 2012-02-15 19:52:35.062574871 -0500
|
||||
@@ -23,6 +23,7 @@
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
+import java.sql.SQLFeatureNotSupportedException;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
@@ -73,5 +74,8 @@
|
||||
public Object unwrap(final Class iface) throws SQLException {
|
||||
throw new SQLException("Not implemented");
|
||||
}
|
||||
+ public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
|
||||
+ throw new SQLFeatureNotSupportedException("getParentLogger() not supported");
|
||||
+ }
|
||||
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
From 6060e6ef497bddc4a9aeac343e584ff324746d58 Mon Sep 17 00:00:00 2001
|
||||
From bb1afd044489984a14b4619fed943e430f36a854 Mon Sep 17 00:00:00 2001
|
||||
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
||||
Date: Wed, 18 Jun 2014 08:11:48 +0200
|
||||
Subject: [PATCH 6/6] Skip Java 8 incompatible test
|
||||
Date: Thu, 30 Jul 2020 15:38:32 +0200
|
||||
Subject: [PATCH 5/8] Skip Java 8 incompatible test
|
||||
|
||||
---
|
||||
src/test/org/apache/velocity/test/issues/VelTools66TestCase.java | 3 ++-
|
||||
.../org/apache/velocity/test/issues/VelTools66TestCase.java | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/test/org/apache/velocity/test/issues/VelTools66TestCase.java b/src/test/org/apache/velocity/test/issues/VelTools66TestCase.java
|
||||
@ -22,5 +22,5 @@ index 00bb0b1..6fb7260 100644
|
||||
|
||||
public static interface TestInterface
|
||||
--
|
||||
1.9.3
|
||||
2.26.2
|
||||
|
24
0006-Run-javadoc-with-Xdoclint-none.patch
Normal file
24
0006-Run-javadoc-with-Xdoclint-none.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From 49155f009858a9332b0d58c814f5166bba0cccde Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Thu, 30 Jul 2020 15:38:59 +0200
|
||||
Subject: [PATCH 6/8] Run javadoc with -Xdoclint:none
|
||||
|
||||
---
|
||||
build/build.xml | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/build/build.xml b/build/build.xml
|
||||
index 479ef2d..0544f2c 100644
|
||||
--- a/build/build.xml
|
||||
+++ b/build/build.xml
|
||||
@@ -592,6 +592,7 @@
|
||||
doctitle="${name} ${version} API"
|
||||
encoding="UTF-8"
|
||||
docencoding="UTF-8"
|
||||
+ additionalparam="-Xdoclint:none"
|
||||
bottom="Copyright © 2000-${build.year} <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved.">
|
||||
|
||||
<link href="${javadocs.ref.jsdk}"/>
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,7 +1,17 @@
|
||||
diff -Nru velocity-1.7/build/build.properties velocity-1.7.osgi/build/build.properties
|
||||
--- velocity-1.7/build/build.properties 2010-11-19 21:16:21.000000000 +0100
|
||||
+++ velocity-1.7.osgi/build/build.properties 2015-07-22 12:21:19.627117810 +0200
|
||||
@@ -166,8 +166,7 @@
|
||||
From e025e3519d3f1e1a12bb8fb896648dfc345fdeba Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Thu, 30 Jul 2020 15:39:36 +0200
|
||||
Subject: [PATCH 7/8] Fix OSGi metadata
|
||||
|
||||
---
|
||||
build/build.properties | 12 ++++--------
|
||||
1 file changed, 4 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/build/build.properties b/build/build.properties
|
||||
index aba450e..6d928bd 100644
|
||||
--- a/build/build.properties
|
||||
+++ b/build/build.properties
|
||||
@@ -166,8 +166,7 @@ javac.source=1.4
|
||||
|
||||
########################################################################
|
||||
# OSGi stuff
|
||||
@ -11,7 +21,7 @@ diff -Nru velocity-1.7/build/build.properties velocity-1.7.osgi/build/build.prop
|
||||
javax.servlet;resolution:=optional,\
|
||||
javax.servlet.http;resolution:=optional,\
|
||||
javax.sql,\
|
||||
@@ -188,8 +187,7 @@
|
||||
@@ -188,8 +187,7 @@ import=com.werken.xpath;resolution:=optional,\
|
||||
org.jdom.input;resolution:=optional,\
|
||||
org.jdom.output;resolution:=optional,\
|
||||
org.xml.sax
|
||||
@ -21,7 +31,7 @@ diff -Nru velocity-1.7/build/build.properties velocity-1.7.osgi/build/build.prop
|
||||
javax.servlet;resolution:=optional,\
|
||||
javax.servlet.http;resolution:=optional,\
|
||||
javax.sql,\
|
||||
@@ -207,8 +205,7 @@
|
||||
@@ -207,8 +205,7 @@ dep.import=com.werken.xpath;resolution:=optional,\
|
||||
export=org.apache.velocity;uses:="org.apache.velocity.context,\
|
||||
org.apache.velocity.exception,\
|
||||
org.apache.velocity.runtime.resource",\
|
||||
@ -31,7 +41,7 @@ diff -Nru velocity-1.7/build/build.properties velocity-1.7.osgi/build/build.prop
|
||||
org.apache.tools.ant.taskdefs,\
|
||||
org.jdom,\
|
||||
org.jdom.output",\
|
||||
@@ -327,8 +324,7 @@
|
||||
@@ -327,8 +324,7 @@ dep.export=org.apache.commons.collections,\
|
||||
org.apache.velocity;uses:="org.apache.velocity.context,\
|
||||
org.apache.velocity.exception,\
|
||||
org.apache.velocity.runtime.resource",\
|
||||
@ -41,3 +51,6 @@ diff -Nru velocity-1.7/build/build.properties velocity-1.7.osgi/build/build.prop
|
||||
org.apache.tools.ant.taskdefs,\
|
||||
org.jdom,\
|
||||
org.jdom.output",\
|
||||
--
|
||||
2.26.2
|
||||
|
567
0008-Port-to-apache-commons-lang3.patch
Normal file
567
0008-Port-to-apache-commons-lang3.patch
Normal file
@ -0,0 +1,567 @@
|
||||
From cd0a1db2ba5930de40b8f884efd492875226e9d8 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio Valentini <decathorpe@gmail.com>
|
||||
Date: Thu, 30 Jul 2020 15:51:00 +0200
|
||||
Subject: [PATCH 8/8] Port to apache commons-lang3
|
||||
|
||||
---
|
||||
build/build.properties | 28 +++++++++----------
|
||||
pom.xml | 6 ++--
|
||||
.../event/implement/EscapeHtmlReference.java | 4 +--
|
||||
.../implement/EscapeJavaScriptReference.java | 4 +--
|
||||
.../event/implement/EscapeSqlReference.java | 5 ++--
|
||||
.../event/implement/EscapeXmlReference.java | 2 +-
|
||||
.../velocity/runtime/RuntimeInstance.java | 2 +-
|
||||
.../velocity/runtime/VelocimacroFactory.java | 2 +-
|
||||
.../velocity/runtime/directive/Block.java | 2 +-
|
||||
.../runtime/directive/RuntimeMacro.java | 2 +-
|
||||
.../velocity/runtime/log/AvalonLogChute.java | 2 +-
|
||||
.../velocity/runtime/parser/Parser.java | 2 +-
|
||||
.../runtime/parser/ParserTokenManager.java | 2 +-
|
||||
.../runtime/parser/node/ASTDirective.java | 2 +-
|
||||
.../runtime/parser/node/ASTMethod.java | 4 +--
|
||||
.../runtime/parser/node/ASTStringLiteral.java | 2 +-
|
||||
.../runtime/parser/node/NodeUtils.java | 2 +-
|
||||
.../runtime/parser/node/PropertyExecutor.java | 2 +-
|
||||
.../parser/node/SetPropertyExecutor.java | 4 +--
|
||||
.../runtime/parser/node/SimpleNode.java | 4 +--
|
||||
.../runtime/resource/ResourceManagerImpl.java | 4 +--
|
||||
.../loader/ClasspathResourceLoader.java | 2 +-
|
||||
.../loader/DataSourceResourceLoader.java | 2 +-
|
||||
.../resource/loader/FileResourceLoader.java | 2 +-
|
||||
.../resource/loader/JarResourceLoader.java | 2 +-
|
||||
.../resource/loader/StringResourceLoader.java | 2 +-
|
||||
.../resource/loader/URLResourceLoader.java | 2 +-
|
||||
.../velocity/util/introspection/ClassMap.java | 2 +-
|
||||
src/parser/Parser.jjt | 2 +-
|
||||
.../io/UnicodeInputStreamTestCase.java | 2 +-
|
||||
.../apache/velocity/test/BaseTestCase.java | 2 +-
|
||||
.../velocity/test/MethodCacheKeyTestCase.java | 2 +-
|
||||
.../org/apache/velocity/test/sql/HsqlDB.java | 2 +-
|
||||
33 files changed, 56 insertions(+), 55 deletions(-)
|
||||
|
||||
diff --git a/build/build.properties b/build/build.properties
|
||||
index 6d928bd..b723852 100644
|
||||
--- a/build/build.properties
|
||||
+++ b/build/build.properties
|
||||
@@ -172,9 +172,9 @@ import=javax.naming,\
|
||||
javax.sql,\
|
||||
org.apache.commons.collections,\
|
||||
org.apache.commons.collections.map,\
|
||||
- org.apache.commons.lang,\
|
||||
- org.apache.commons.lang.builder,\
|
||||
- org.apache.commons.lang.text,\
|
||||
+ org.apache.commons.lang3,\
|
||||
+ org.apache.commons.lang3.builder,\
|
||||
+ org.apache.commons.lang3.text,\
|
||||
org.apache.commons.logging;resolution:=optional,\
|
||||
org.apache.log;resolution:=optional,\
|
||||
org.apache.log.format;resolution:=optional,\
|
||||
@@ -260,7 +260,7 @@ export=org.apache.velocity;uses:="org.apache.velocity.context,\
|
||||
org.apache.velocity.runtime,\
|
||||
org.apache.velocity.runtime.directive,\
|
||||
org.apache.velocity.runtime.parser.node",\
|
||||
- org.apache.velocity.runtime.parser.node;uses:="org.apache.commons.lang.text,\
|
||||
+ org.apache.velocity.runtime.parser.node;uses:="org.apache.commons.lang3.text,\
|
||||
org.apache.velocity.context,\
|
||||
org.apache.velocity.exception,\
|
||||
org.apache.velocity.runtime,\
|
||||
@@ -303,15 +303,15 @@ export=org.apache.velocity;uses:="org.apache.velocity.context,\
|
||||
dep.export=org.apache.commons.collections,\
|
||||
org.apache.commons.collections.iterators;uses:="org.apache.commons.collections",\
|
||||
org.apache.commons.collections.map;uses:="org.apache.commons.collections",\
|
||||
- org.apache.commons.lang;uses:="org.apache.commons.lang.exception",\
|
||||
- org.apache.commons.lang.builder,\
|
||||
- org.apache.commons.lang.enum,\
|
||||
- org.apache.commons.lang.enums,\
|
||||
- org.apache.commons.lang.exception,\
|
||||
- org.apache.commons.lang.math,\
|
||||
- org.apache.commons.lang.mutable,\
|
||||
- org.apache.commons.lang.text,\
|
||||
- org.apache.commons.lang.time,\
|
||||
+ org.apache.commons.lang3;uses:="org.apache.commons.lang3.exception",\
|
||||
+ org.apache.commons.lang3.builder,\
|
||||
+ org.apache.commons.lang3.enum,\
|
||||
+ org.apache.commons.lang3.enums,\
|
||||
+ org.apache.commons.lang3.exception,\
|
||||
+ org.apache.commons.lang3.math,\
|
||||
+ org.apache.commons.lang3.mutable,\
|
||||
+ org.apache.commons.lang3.text,\
|
||||
+ org.apache.commons.lang3.time,\
|
||||
org.apache.oro.io;uses:="org.apache.oro.text,\
|
||||
org.apache.oro.text.regex",\
|
||||
org.apache.oro.text;uses:="org.apache.oro.text.regex,\
|
||||
@@ -379,7 +379,7 @@ dep.export=org.apache.commons.collections,\
|
||||
org.apache.velocity.runtime,\
|
||||
org.apache.velocity.runtime.directive,\
|
||||
org.apache.velocity.runtime.parser.node",\
|
||||
- org.apache.velocity.runtime.parser.node;uses:="org.apache.commons.lang.text,\
|
||||
+ org.apache.velocity.runtime.parser.node;uses:="org.apache.commons.lang3.text,\
|
||||
org.apache.velocity.context,\
|
||||
org.apache.velocity.exception,\
|
||||
org.apache.velocity.runtime,\
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 8cb5d3f..56af634 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -148,9 +148,9 @@
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
- <groupId>commons-lang</groupId>
|
||||
- <artifactId>commons-lang</artifactId>
|
||||
- <version>2.4</version>
|
||||
+ <groupId>org.apache.commons</groupId>
|
||||
+ <artifactId>commons-lang3</artifactId>
|
||||
+ <version>3.8.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>oro</groupId>
|
||||
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java
|
||||
index 6d98b45..56d1e62 100644
|
||||
--- a/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java
|
||||
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeHtmlReference.java
|
||||
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
-import org.apache.commons.lang.StringEscapeUtils;
|
||||
+import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
/**
|
||||
* Escape all HTML entities.
|
||||
@@ -39,7 +39,7 @@ public class EscapeHtmlReference extends EscapeReference
|
||||
*/
|
||||
protected String escape(Object text)
|
||||
{
|
||||
- return StringEscapeUtils.escapeHtml(text.toString());
|
||||
+ return StringEscapeUtils.ESCAPE_HTML4.translate(text.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java
|
||||
index ea49ddb..b9196c5 100644
|
||||
--- a/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java
|
||||
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeJavaScriptReference.java
|
||||
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
-import org.apache.commons.lang.StringEscapeUtils;
|
||||
+import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
/**
|
||||
* Escapes the characters in a String to be suitable for use in JavaScript.
|
||||
@@ -39,7 +39,7 @@ public class EscapeJavaScriptReference extends EscapeReference
|
||||
*/
|
||||
protected String escape(Object text)
|
||||
{
|
||||
- return StringEscapeUtils.escapeJavaScript(text.toString());
|
||||
+ return StringEscapeUtils.ESCAPE_ECMASCRIPT.translate(text.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
|
||||
index 585cb6c..adea560 100644
|
||||
--- a/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
|
||||
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeSqlReference.java
|
||||
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
-import org.apache.commons.lang.StringEscapeUtils;
|
||||
+import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
/**
|
||||
* Escapes the characters in a String to be suitable to pass to an SQL query.
|
||||
@@ -39,7 +39,8 @@ public class EscapeSqlReference extends EscapeReference
|
||||
*/
|
||||
protected String escape(Object text)
|
||||
{
|
||||
- return StringEscapeUtils.escapeSql(text.toString());
|
||||
+ // commons-lang3 dropped the SQL escaper because it was incomplete
|
||||
+ return text.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
diff --git a/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java b/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java
|
||||
index 3d5b40f..fbb525c 100644
|
||||
--- a/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java
|
||||
+++ b/src/java/org/apache/velocity/app/event/implement/EscapeXmlReference.java
|
||||
@@ -19,7 +19,7 @@ package org.apache.velocity.app.event.implement;
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
-import org.apache.commons.lang.StringEscapeUtils;
|
||||
+import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
/**
|
||||
* Escape all XML entities.
|
||||
diff --git a/src/java/org/apache/velocity/runtime/RuntimeInstance.java b/src/java/org/apache/velocity/runtime/RuntimeInstance.java
|
||||
index bf99faa..a79d42c 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/RuntimeInstance.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/RuntimeInstance.java
|
||||
@@ -32,7 +32,7 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.collections.ExtendedProperties;
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.Template;
|
||||
import org.apache.velocity.app.event.EventCartridge;
|
||||
import org.apache.velocity.app.event.EventHandler;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/VelocimacroFactory.java b/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
|
||||
index 2737b3b..956ab05 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/VelocimacroFactory.java
|
||||
@@ -26,7 +26,7 @@ import java.util.Map;
|
||||
import java.util.Vector;
|
||||
import java.util.ArrayList;
|
||||
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.velocity.Template;
|
||||
import org.apache.velocity.exception.VelocityException;
|
||||
import org.apache.velocity.runtime.directive.Directive;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/directive/Block.java b/src/java/org/apache/velocity/runtime/directive/Block.java
|
||||
index f5fdfa8..b136543 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/directive/Block.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/directive/Block.java
|
||||
@@ -23,7 +23,7 @@ import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.io.Writer;
|
||||
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.context.InternalContextAdapter;
|
||||
import org.apache.velocity.exception.TemplateInitException;
|
||||
import org.apache.velocity.runtime.Renderable;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java b/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
|
||||
index 090b552..d22ac4e 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/directive/RuntimeMacro.java
|
||||
@@ -23,7 +23,7 @@ import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.List;
|
||||
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.context.InternalContextAdapter;
|
||||
import org.apache.velocity.exception.MethodInvocationException;
|
||||
import org.apache.velocity.exception.ParseErrorException;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java b/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
|
||||
index f4016ca..f7e467d 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
|
||||
@@ -24,7 +24,7 @@ import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.log.Hierarchy;
|
||||
import org.apache.log.LogTarget;
|
||||
import org.apache.log.Logger;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/Parser.java b/src/java/org/apache/velocity/runtime/parser/Parser.java
|
||||
index 085e7a4..62dfe48 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/Parser.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/Parser.java
|
||||
@@ -10,7 +10,7 @@ import org.apache.velocity.runtime.directive.Directive;
|
||||
import org.apache.velocity.runtime.directive.Macro;
|
||||
import org.apache.velocity.runtime.directive.MacroParseException;
|
||||
import org.apache.velocity.util.StringUtils;
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.runtime.RuntimeConstants;
|
||||
|
||||
/**
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java b/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
|
||||
index ce00d99..9563a1f 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/ParserTokenManager.java
|
||||
@@ -9,7 +9,7 @@ import org.apache.velocity.runtime.directive.Directive;
|
||||
import org.apache.velocity.runtime.directive.Macro;
|
||||
import org.apache.velocity.runtime.directive.MacroParseException;
|
||||
import org.apache.velocity.util.StringUtils;
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.runtime.RuntimeConstants;
|
||||
|
||||
/** Token Manager. */
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java b/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
|
||||
index 86e86b7..f1ab78d 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/node/ASTDirective.java
|
||||
@@ -22,7 +22,7 @@ package org.apache.velocity.runtime.parser.node;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
-import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
+import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.velocity.context.InternalContextAdapter;
|
||||
import org.apache.velocity.exception.MethodInvocationException;
|
||||
import org.apache.velocity.exception.ParseErrorException;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java b/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
|
||||
index a1545e5..7354c9a 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
|
||||
@@ -21,8 +21,8 @@ package org.apache.velocity.runtime.parser.node;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
-import org.apache.commons.lang.ArrayUtils;
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.ArrayUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.velocity.app.event.EventHandlerUtil;
|
||||
import org.apache.velocity.context.InternalContextAdapter;
|
||||
import org.apache.velocity.exception.MethodInvocationException;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java b/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
|
||||
index bb56cd9..0bc63bc 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/node/ASTStringLiteral.java
|
||||
@@ -21,7 +21,7 @@ import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.context.InternalContextAdapter;
|
||||
import org.apache.velocity.exception.TemplateInitException;
|
||||
import org.apache.velocity.exception.VelocityException;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java b/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
|
||||
index 52bcda9..8362c3e 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/node/NodeUtils.java
|
||||
@@ -19,7 +19,7 @@ package org.apache.velocity.runtime.parser.node;
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.context.Context;
|
||||
import org.apache.velocity.exception.MethodInvocationException;
|
||||
import org.apache.velocity.runtime.parser.ParserConstants;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java b/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java
|
||||
index 8c78228..20d6c18 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/node/PropertyExecutor.java
|
||||
@@ -21,7 +21,7 @@ package org.apache.velocity.runtime.parser.node;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.velocity.exception.VelocityException;
|
||||
import org.apache.velocity.runtime.RuntimeLogger;
|
||||
import org.apache.velocity.runtime.log.Log;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java b/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java
|
||||
index 0b27b45..ba5d512 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/node/SetPropertyExecutor.java
|
||||
@@ -21,8 +21,8 @@ package org.apache.velocity.runtime.parser.node;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.exception.VelocityException;
|
||||
import org.apache.velocity.runtime.log.Log;
|
||||
import org.apache.velocity.util.introspection.Introspector;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java b/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
|
||||
index 108846f..6372830 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/parser/node/SimpleNode.java
|
||||
@@ -22,8 +22,8 @@ package org.apache.velocity.runtime.parser.node;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
|
||||
-import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.context.InternalContextAdapter;
|
||||
import org.apache.velocity.exception.MethodInvocationException;
|
||||
import org.apache.velocity.exception.ParseErrorException;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java b/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
|
||||
index 1b504eb..b33d4ed 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/resource/ResourceManagerImpl.java
|
||||
@@ -158,7 +158,7 @@ public class ResourceManagerImpl
|
||||
|
||||
Object cacheObject = null;
|
||||
|
||||
- if (org.apache.commons.lang.StringUtils.isNotEmpty(cacheClassName))
|
||||
+ if (org.apache.commons.lang3.StringUtils.isNotEmpty(cacheClassName))
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -534,7 +534,7 @@ public class ResourceManagerImpl
|
||||
* this strikes me as bad...
|
||||
*/
|
||||
|
||||
- if (!org.apache.commons.lang.StringUtils.equals(resource.getEncoding(), encoding))
|
||||
+ if (!org.apache.commons.lang3.StringUtils.equals(resource.getEncoding(), encoding))
|
||||
{
|
||||
log.warn("Declared encoding for template '" +
|
||||
resource.getName() +
|
||||
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
|
||||
index 623766f..a7cc276 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/resource/loader/ClasspathResourceLoader.java
|
||||
@@ -22,7 +22,7 @@ package org.apache.velocity.runtime.resource.loader;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.apache.commons.collections.ExtendedProperties;
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.velocity.exception.ResourceNotFoundException;
|
||||
import org.apache.velocity.runtime.resource.Resource;
|
||||
import org.apache.velocity.util.ClassUtils;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
|
||||
index 833e0ac..7414913 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/resource/loader/DataSourceResourceLoader.java
|
||||
@@ -218,7 +218,7 @@ public class DataSourceResourceLoader extends ResourceLoader
|
||||
public synchronized InputStream getResourceStream(final String name)
|
||||
throws ResourceNotFoundException
|
||||
{
|
||||
- if (org.apache.commons.lang.StringUtils.isEmpty(name))
|
||||
+ if (org.apache.commons.lang3.StringUtils.isEmpty(name))
|
||||
{
|
||||
throw new ResourceNotFoundException("DataSourceResourceLoader: Template name was empty or null");
|
||||
}
|
||||
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
|
||||
index 462ed16..3898889 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/resource/loader/FileResourceLoader.java
|
||||
@@ -118,7 +118,7 @@ public class FileResourceLoader extends ResourceLoader
|
||||
/*
|
||||
* Make sure we have a valid templateName.
|
||||
*/
|
||||
- if (org.apache.commons.lang.StringUtils.isEmpty(templateName))
|
||||
+ if (org.apache.commons.lang3.StringUtils.isEmpty(templateName))
|
||||
{
|
||||
/*
|
||||
* If we don't get a properly formed templateName then
|
||||
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
|
||||
index 172384e..b7fb1a7 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/resource/loader/JarResourceLoader.java
|
||||
@@ -195,7 +195,7 @@ public class JarResourceLoader extends ResourceLoader
|
||||
{
|
||||
InputStream results = null;
|
||||
|
||||
- if (org.apache.commons.lang.StringUtils.isEmpty(source))
|
||||
+ if (org.apache.commons.lang3.StringUtils.isEmpty(source))
|
||||
{
|
||||
throw new ResourceNotFoundException("Need to have a resource!");
|
||||
}
|
||||
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
|
||||
index 895182d..41c0ec9 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/resource/loader/StringResourceLoader.java
|
||||
@@ -26,7 +26,7 @@ import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import org.apache.commons.collections.ExtendedProperties;
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.velocity.exception.ResourceNotFoundException;
|
||||
import org.apache.velocity.exception.VelocityException;
|
||||
import org.apache.velocity.runtime.resource.Resource;
|
||||
diff --git a/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java b/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
|
||||
index de06636..74ab86a 100644
|
||||
--- a/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
|
||||
+++ b/src/java/org/apache/velocity/runtime/resource/loader/URLResourceLoader.java
|
||||
@@ -26,7 +26,7 @@ import java.net.URL;
|
||||
import java.net.URLConnection;
|
||||
import java.util.HashMap;
|
||||
import org.apache.commons.collections.ExtendedProperties;
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.velocity.exception.VelocityException;
|
||||
import org.apache.velocity.exception.ResourceNotFoundException;
|
||||
import org.apache.velocity.runtime.resource.Resource;
|
||||
diff --git a/src/java/org/apache/velocity/util/introspection/ClassMap.java b/src/java/org/apache/velocity/util/introspection/ClassMap.java
|
||||
index 66bc7b1..77c1c8b 100644
|
||||
--- a/src/java/org/apache/velocity/util/introspection/ClassMap.java
|
||||
+++ b/src/java/org/apache/velocity/util/introspection/ClassMap.java
|
||||
@@ -23,7 +23,7 @@ import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.runtime.log.Log;
|
||||
import org.apache.velocity.util.MapFactory;
|
||||
|
||||
diff --git a/src/parser/Parser.jjt b/src/parser/Parser.jjt
|
||||
index 7ebdb67..f5d3c62 100644
|
||||
--- a/src/parser/Parser.jjt
|
||||
+++ b/src/parser/Parser.jjt
|
||||
@@ -86,7 +86,7 @@ import org.apache.velocity.runtime.directive.Directive;
|
||||
import org.apache.velocity.runtime.directive.Macro;
|
||||
import org.apache.velocity.runtime.directive.MacroParseException;
|
||||
import org.apache.velocity.util.StringUtils;
|
||||
-import org.apache.commons.lang.text.StrBuilder;
|
||||
+import org.apache.commons.lang3.text.StrBuilder;
|
||||
import org.apache.velocity.runtime.RuntimeConstants;
|
||||
|
||||
/**
|
||||
diff --git a/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java b/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java
|
||||
index 3142f45..ff36682 100644
|
||||
--- a/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java
|
||||
+++ b/src/test/org/apache/velocity/io/UnicodeInputStreamTestCase.java
|
||||
@@ -27,7 +27,7 @@ import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
-import org.apache.commons.lang.ArrayUtils;
|
||||
+import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
|
||||
/**
|
||||
diff --git a/src/test/org/apache/velocity/test/BaseTestCase.java b/src/test/org/apache/velocity/test/BaseTestCase.java
|
||||
index 9faf585..f893d0f 100644
|
||||
--- a/src/test/org/apache/velocity/test/BaseTestCase.java
|
||||
+++ b/src/test/org/apache/velocity/test/BaseTestCase.java
|
||||
@@ -353,7 +353,7 @@ public abstract class BaseTestCase extends TestCase implements TemplateTestBase
|
||||
buf.append(baseFile.getPath());
|
||||
}
|
||||
|
||||
- if (org.apache.commons.lang.StringUtils.isNotEmpty(ext))
|
||||
+ if (org.apache.commons.lang3.StringUtils.isNotEmpty(ext))
|
||||
{
|
||||
buf.append('.').append(ext);
|
||||
}
|
||||
diff --git a/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java b/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java
|
||||
index d1ad1db..e70c5f2 100644
|
||||
--- a/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java
|
||||
+++ b/src/test/org/apache/velocity/test/MethodCacheKeyTestCase.java
|
||||
@@ -21,7 +21,7 @@ package org.apache.velocity.test;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
-import org.apache.commons.lang.ArrayUtils;
|
||||
+import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.velocity.runtime.parser.node.ASTMethod;
|
||||
|
||||
/**
|
||||
diff --git a/src/test/org/apache/velocity/test/sql/HsqlDB.java b/src/test/org/apache/velocity/test/sql/HsqlDB.java
|
||||
index 6f6c9f6..89d9d53 100644
|
||||
--- a/src/test/org/apache/velocity/test/sql/HsqlDB.java
|
||||
+++ b/src/test/org/apache/velocity/test/sql/HsqlDB.java
|
||||
@@ -19,7 +19,7 @@ package org.apache.velocity.test.sql;
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
-import org.apache.commons.lang.StringUtils;
|
||||
+import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import org.hsqldb.jdbcDriver;
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,11 +0,0 @@
|
||||
diff -Nru velocity-1.7/build/build.xml velocity-1.7.doclint/build/build.xml
|
||||
--- velocity-1.7/build/build.xml 2015-07-22 12:13:51.566920750 +0200
|
||||
+++ velocity-1.7.doclint/build/build.xml 2015-07-22 12:13:14.929703544 +0200
|
||||
@@ -592,6 +592,7 @@
|
||||
doctitle="${name} ${version} API"
|
||||
encoding="UTF-8"
|
||||
docencoding="UTF-8"
|
||||
+ additionalparam="-Xdoclint:none"
|
||||
bottom="Copyright © 2000-${build.year} <a href="http://www.apache.org/">Apache Software Foundation</a>. All Rights Reserved.">
|
||||
|
||||
<link href="${javadocs.ref.jsdk}"/>
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: velocity
|
||||
Version: 1.7
|
||||
Release: 31%{?dist}
|
||||
Release: 32%{?dist}
|
||||
Epoch: 0
|
||||
Summary: Java-based template engine
|
||||
License: ASL 2.0
|
||||
@ -15,14 +15,15 @@ Source1: http://repo1.maven.org/maven2/org/apache/%{name}/%{name}/%{versi
|
||||
# Remove bundled binaries which cannot be easily verified for licensing
|
||||
Source2: generate-tarball.sh
|
||||
|
||||
Patch0: 0001-Remove-avalon-logkit.patch
|
||||
Patch1: 0004-Use-log4j-1.2.17.patch
|
||||
Patch2: 0003-Use-system-jars.patch
|
||||
Patch3: 0004-JDBC-41-compat.patch
|
||||
Patch4: 0001-Don-t-use-Werken-XPath.patch
|
||||
Patch5: 0006-Skip-Java-8-incompatible-test.patch
|
||||
Patch6: velocity-1.7-doclint.patch
|
||||
Patch7: velocity-1.7-osgi.patch
|
||||
Patch0: 0000-Remove-avalon-logkit.patch
|
||||
Patch1: 0001-Use-log4j-1.2.17.patch
|
||||
Patch2: 0002-Use-system-jars.patch
|
||||
Patch3: 0003-JDBC-41-compat.patch
|
||||
Patch4: 0004-Do-not-use-Werken-XPath.patch
|
||||
Patch5: 0005-Skip-Java-8-incompatible-test.patch
|
||||
Patch6: 0006-Run-javadoc-with-Xdoclint-none.patch
|
||||
Patch7: 0007-Fix-OSGi-metadata.patch
|
||||
Patch8: 0008-Port-to-apache-commons-lang3.patch
|
||||
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: ant
|
||||
@ -34,7 +35,7 @@ BuildRequires: hsqldb-lib
|
||||
%endif
|
||||
BuildRequires: apache-commons-collections
|
||||
BuildRequires: apache-commons-logging
|
||||
BuildRequires: apache-commons-lang
|
||||
BuildRequires: apache-commons-lang3
|
||||
BuildRequires: glassfish-servlet-api
|
||||
BuildRequires: jakarta-oro
|
||||
BuildRequires: jaxen
|
||||
@ -92,17 +93,6 @@ Demonstrations and samples for %{name}.
|
||||
find . -name '*.jar' ! -name 'test*.jar' -print -delete
|
||||
find . -name '*.class' ! -name 'Foo.class' -print -delete
|
||||
|
||||
# Remove dependency on avalon-logkit
|
||||
rm -f src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
|
||||
rm -f src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java
|
||||
rm -f src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
|
||||
|
||||
# need porting to new servlet API. We would just add a lot of empty functions
|
||||
rm src/test/org/apache/velocity/test/VelocityServletTestCase.java
|
||||
|
||||
# This test doesn't work with new hsqldb
|
||||
rm src/test/org/apache/velocity/test/sql/DataSourceResourceLoaderTestCase.java
|
||||
|
||||
cp %{SOURCE1} ./pom.xml
|
||||
|
||||
# remove rest of avalon logkit refences
|
||||
@ -129,6 +119,20 @@ cp %{SOURCE1} ./pom.xml
|
||||
# Remove werken-xpath Import/Export refences in OSGi manifest file
|
||||
%patch7 -p1
|
||||
|
||||
# Port to apache commons-lang3
|
||||
%patch8 -p1
|
||||
|
||||
# Remove dependency on avalon-logkit
|
||||
rm -f src/java/org/apache/velocity/runtime/log/AvalonLogChute.java
|
||||
rm -f src/java/org/apache/velocity/runtime/log/AvalonLogSystem.java
|
||||
rm -f src/java/org/apache/velocity/runtime/log/VelocityFormatter.java
|
||||
|
||||
# need porting to new servlet API. We would just add a lot of empty functions
|
||||
rm src/test/org/apache/velocity/test/VelocityServletTestCase.java
|
||||
|
||||
# This test doesn't work with new hsqldb
|
||||
rm src/test/org/apache/velocity/test/sql/DataSourceResourceLoaderTestCase.java
|
||||
|
||||
%if %{without hsqldb}
|
||||
rm -r src/test/org/apache/velocity/test/sql
|
||||
%endif
|
||||
@ -139,7 +143,7 @@ rm -r src/test/org/apache/velocity/test/sql
|
||||
export CLASSPATH=$(build-classpath \
|
||||
antlr \
|
||||
apache-commons-collections \
|
||||
commons-lang \
|
||||
commons-lang3 \
|
||||
commons-logging \
|
||||
glassfish-servlet-api \
|
||||
junit \
|
||||
@ -192,6 +196,9 @@ cp -pr examples test %{buildroot}%{_datadir}/%{name}
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Thu Jul 30 2020 Fabio Valentini <decathorpe@gmail.com> - 0:1.7-32
|
||||
- Port to commons-lang3.
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.7-31
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user