This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-jxpath.git
The following commit(s) were added to refs/heads/master by this push: new 60599c6 Use HTTPS in Git URL 60599c6 is described below commit 60599c6771db9861ac9f8e195e063061d40b7572 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Jul 6 09:58:01 2025 -0400 Use HTTPS in Git URL Reuse SystemProperties --- pom.xml | 1 - src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java | 7 ++----- src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java | 3 ++- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index edc37d6..bc49ec2 100644 --- a/pom.xml +++ b/pom.xml @@ -220,7 +220,6 @@ <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.17.0</version> - <scope>test</scope> </dependency> <dependency> <groupId>commons-io</groupId> diff --git a/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java b/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java index 2ec6942..8b3ab82 100644 --- a/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java +++ b/src/main/java/org/apache/commons/jxpath/JXPathContextFactory.java @@ -27,6 +27,7 @@ import java.nio.file.Paths; import java.util.Properties; import org.apache.commons.jxpath.util.ClassLoaderUtil; +import org.apache.commons.lang3.SystemProperties; /** * Defines a factory API that enables applications to obtain a {@link JXPathContext} instance. To acquire a JXPathContext, first call the static @@ -56,11 +57,7 @@ public abstract class JXPathContextFactory { private static boolean debug; static { - try { - debug = System.getProperty("jxpath.debug") != null; - } catch (final SecurityException ignore) { // NOPMD - // This is ok - } + debug = SystemProperties.getProperty("jxpath.debug") != null; } /** diff --git a/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java b/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java index d95b447..5fc628c 100644 --- a/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java +++ b/src/main/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java @@ -34,7 +34,8 @@ public final class ClassLoaderUtil { /** * Maps a primitive class name to its corresponding abbreviation used in array class names. */ - private static Map<String, String> abbreviationMap = new HashMap<>(); + private static final Map<String, String> abbreviationMap = new HashMap<>(); + /** * Feed abbreviation maps */