This is an automated email from the ASF dual-hosted git repository. tv pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jcs.git
commit 43670dc9a19fed23d7e54ca86399e10b03152a05 Author: Thomas Vandahl <t...@apache.org> AuthorDate: Sat Mar 27 19:06:26 2021 +0100 Use commons-text StringSubstitutor to fix deprecation --- commons-jcs-jcache/pom.xml | 5 ++--- .../commons/jcs3/jcache/lang/Lang3Substitutor.java | 19 ++++++++++--------- pom.xml | 3 +-- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/commons-jcs-jcache/pom.xml b/commons-jcs-jcache/pom.xml index fdd6839..ede8193 100644 --- a/commons-jcs-jcache/pom.xml +++ b/commons-jcs-jcache/pom.xml @@ -67,8 +67,8 @@ <dependency> <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - <version>${commons.lang.version}</version> + <artifactId>commons-text</artifactId> + <version>${commons.text.version}</version> <optional>true</optional> </dependency> @@ -80,7 +80,6 @@ <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest</artifactId> - <version>${hamcrest.version}</version> <scope>test</scope> </dependency> </dependencies> diff --git a/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/lang/Lang3Substitutor.java b/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/lang/Lang3Substitutor.java index 01965cb..993dad4 100644 --- a/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/lang/Lang3Substitutor.java +++ b/commons-jcs-jcache/src/main/java/org/apache/commons/jcs3/jcache/lang/Lang3Substitutor.java @@ -19,22 +19,23 @@ package org.apache.commons.jcs3.jcache.lang; -import org.apache.commons.lang3.text.StrSubstitutor; - import java.util.HashMap; import java.util.Map; +import org.apache.commons.text.StringSubstitutor; + public class Lang3Substitutor implements Subsitutor { - private static final StrSubstitutor SUBSTITUTOR = new StrSubstitutor(new HashMap<String, Object>() {/** - * - */ + private static final StringSubstitutor SUBSTITUTOR = new StringSubstitutor(new HashMap<String, Object>() + { + /** Serial version id */ private static final long serialVersionUID = 6568870218326105688L; - { - putAll(Map.class.cast(System.getProperties())); - putAll(System.getenv()); - }}); + { + putAll(Map.class.cast(System.getProperties())); + putAll(System.getenv()); + } + }); @Override public String substitute(final String value) diff --git a/pom.xml b/pom.xml index c0a4373..0053e16 100644 --- a/pom.xml +++ b/pom.xml @@ -547,8 +547,7 @@ <jsr107.api.version>1.0.1</jsr107.api.version> <commons.collections.version>4.4</commons.collections.version> - <commons.lang.version>3.12.0</commons.lang.version> - <commons.clirr.version>2.8</commons.clirr.version> + <commons.text.version>1.9</commons.text.version> <commons.assembly-plugin.version>3.3.0</commons.assembly-plugin.version> <test.type>Unit</test.type>