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-lang.git
The following commit(s) were added to refs/heads/master by this push: new 106b61a5b Add SystemProperties.JAVA_SECURITY_DEBUG 106b61a5b is described below commit 106b61a5be740b6e784c3aae4aa10d5b6df832b1 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Apr 7 12:45:15 2025 -0400 Add SystemProperties.JAVA_SECURITY_DEBUG --- src/changes/changes.xml | 1 + src/main/java/org/apache/commons/lang3/SystemProperties.java | 9 +++++++++ src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java | 8 +++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index e7aace5b2..12faf306f 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -111,6 +111,7 @@ The <action> type attribute can be add,update,fix,remove. <action type="add" dev="ggregory" due-to="Gary Gregory">Add SystemUtils.getUserDirPath().</action> <action type="add" dev="ggregory" due-to="Gary Gregory">Add SystemUtils.getUserHomePath().</action> <action type="add" dev="ggregory" due-to="Gary Gregory">Add ArrayFill.fill(T[], FailableIntFunction)).</action> + <action type="add" dev="ggregory" due-to="Gary Gregory">Add SystemProperties.JAVA_SECURITY_DEBUG.</action> <!-- UPDATE --> <action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 73 to 81 #1267, #1277, #1283, #1288, #1302.</action> <action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">[site] Bump org.codehaus.mojo:taglist-maven-plugin from 3.1.0 to 3.2.1 #1300.</action> diff --git a/src/main/java/org/apache/commons/lang3/SystemProperties.java b/src/main/java/org/apache/commons/lang3/SystemProperties.java index cab6859eb..b86f6962e 100644 --- a/src/main/java/org/apache/commons/lang3/SystemProperties.java +++ b/src/main/java/org/apache/commons/lang3/SystemProperties.java @@ -505,6 +505,15 @@ public final class SystemProperties { */ public static final String JAVA_SECURITY_AUTH_LOGIN_CONFIG = "java.security.auth.login.config"; + /** + * The System property name {@value}. + * + * @see <a href= + * "https://docs.oracle.com/en/java/javase/24/security/troubleshooting-security.html">java.security.debug</a> + * @since 3.18.0 + */ + public static final String JAVA_SECURITY_DEBUG = "java.security.debug"; + /** * The System property name {@value}. * diff --git a/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java b/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java index 2544794e8..9e9c06d38 100644 --- a/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java +++ b/src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java @@ -25,6 +25,7 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.function.ThrowingSupplier; public class SystemPropertiesTest { @@ -107,6 +108,7 @@ public void testActualKeys() { basicKeyCheck(SystemProperties.JAVA_RUNTIME_NAME); basicKeyCheck(SystemProperties.JAVA_RUNTIME_VERSION); basicKeyCheck(SystemProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG); + basicKeyCheck(SystemProperties.JAVA_SECURITY_DEBUG); basicKeyCheck(SystemProperties.JAVA_SECURITY_MANAGER); basicKeyCheck(SystemProperties.JAVA_SPECIFICATION_MAINTENANCE_VERSION); basicKeyCheck(SystemProperties.JAVA_SPECIFICATION_NAME); @@ -325,7 +327,7 @@ public void testGetDoesNotThrow() { assertDoesNotThrow(SystemProperties::getJavaSpecificationMaintenanceVersion); assertDoesNotThrow(SystemProperties::getJavaSpecificationName); assertDoesNotThrow(SystemProperties::getJavaSpecificationVendor); - assertDoesNotThrow(() -> SystemProperties.getJavaSpecificationVersion()); + assertDoesNotThrow((ThrowingSupplier<String>) SystemProperties::getJavaSpecificationVersion); assertDoesNotThrow(SystemProperties::getJavaSystemClassLoader); assertDoesNotThrow(SystemProperties::getJavaTimeZoneDefaultZoneRulesProvider); assertDoesNotThrow(SystemProperties::getJavaUtilConcurrentForkJoinPoolCommonExceptionHandler); @@ -417,7 +419,7 @@ public void testGetDoesNotThrow() { assertDoesNotThrow(SystemProperties::getJdkXmlResetSymbolTable); assertDoesNotThrow(SystemProperties::getJdkXmlTotalEntitySizeLimit); assertDoesNotThrow(SystemProperties::getJdkXmlXsltcIsStandalone); - assertDoesNotThrow(() -> SystemProperties.getLineSeparator()); + assertDoesNotThrow((ThrowingSupplier<String>) SystemProperties::getLineSeparator); assertDoesNotThrow(SystemProperties::getNativeEncoding); assertDoesNotThrow(SystemProperties::getNetworkAddressCacheNegativeTtl); assertDoesNotThrow(SystemProperties::getNetworkAddressCacheStaleTtl); @@ -446,7 +448,7 @@ public void testGetDoesNotThrow() { assertDoesNotThrow(SystemProperties::getUserExtensions); assertDoesNotThrow(SystemProperties::getUserHome); assertDoesNotThrow(SystemProperties::getUserLanguage); - assertDoesNotThrow(() -> SystemProperties.getUserName()); + assertDoesNotThrow((ThrowingSupplier<String>) SystemProperties::getUserName); assertDoesNotThrow(SystemProperties::getUserRegion); assertDoesNotThrow(SystemProperties::getUserScript); assertDoesNotThrow(SystemProperties::getUserTimezone);