Skip to content

Commit 106b61a

Browse files
committed
Add SystemProperties.JAVA_SECURITY_DEBUG
1 parent 3b31276 commit 106b61a

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

Diff for: src/changes/changes.xml

+1
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ The <action> type attribute can be add,update,fix,remove.
111111
<action type="add" dev="ggregory" due-to="Gary Gregory">Add SystemUtils.getUserDirPath().</action>
112112
<action type="add" dev="ggregory" due-to="Gary Gregory">Add SystemUtils.getUserHomePath().</action>
113113
<action type="add" dev="ggregory" due-to="Gary Gregory">Add ArrayFill.fill(T[], FailableIntFunction)).</action>
114+
<action type="add" dev="ggregory" due-to="Gary Gregory">Add SystemProperties.JAVA_SECURITY_DEBUG.</action>
114115
<!-- UPDATE -->
115116
<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>
116117
<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 for: src/main/java/org/apache/commons/lang3/SystemProperties.java

+9
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,15 @@ public final class SystemProperties {
505505
*/
506506
public static final String JAVA_SECURITY_AUTH_LOGIN_CONFIG = "java.security.auth.login.config";
507507

508+
/**
509+
* The System property name {@value}.
510+
*
511+
* @see <a href=
512+
* "https://docs.oracle.com/en/java/javase/24/security/troubleshooting-security.html">java.security.debug</a>
513+
* @since 3.18.0
514+
*/
515+
public static final String JAVA_SECURITY_DEBUG = "java.security.debug";
516+
508517
/**
509518
* The System property name {@value}.
510519
*

Diff for: src/test/java/org/apache/commons/lang3/SystemPropertiesTest.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import static org.junit.jupiter.api.Assumptions.assumeTrue;
2626

2727
import org.junit.jupiter.api.Test;
28+
import org.junit.jupiter.api.function.ThrowingSupplier;
2829

2930
public class SystemPropertiesTest {
3031

@@ -107,6 +108,7 @@ public void testActualKeys() {
107108
basicKeyCheck(SystemProperties.JAVA_RUNTIME_NAME);
108109
basicKeyCheck(SystemProperties.JAVA_RUNTIME_VERSION);
109110
basicKeyCheck(SystemProperties.JAVA_SECURITY_AUTH_LOGIN_CONFIG);
111+
basicKeyCheck(SystemProperties.JAVA_SECURITY_DEBUG);
110112
basicKeyCheck(SystemProperties.JAVA_SECURITY_MANAGER);
111113
basicKeyCheck(SystemProperties.JAVA_SPECIFICATION_MAINTENANCE_VERSION);
112114
basicKeyCheck(SystemProperties.JAVA_SPECIFICATION_NAME);
@@ -325,7 +327,7 @@ public void testGetDoesNotThrow() {
325327
assertDoesNotThrow(SystemProperties::getJavaSpecificationMaintenanceVersion);
326328
assertDoesNotThrow(SystemProperties::getJavaSpecificationName);
327329
assertDoesNotThrow(SystemProperties::getJavaSpecificationVendor);
328-
assertDoesNotThrow(() -> SystemProperties.getJavaSpecificationVersion());
330+
assertDoesNotThrow((ThrowingSupplier<String>) SystemProperties::getJavaSpecificationVersion);
329331
assertDoesNotThrow(SystemProperties::getJavaSystemClassLoader);
330332
assertDoesNotThrow(SystemProperties::getJavaTimeZoneDefaultZoneRulesProvider);
331333
assertDoesNotThrow(SystemProperties::getJavaUtilConcurrentForkJoinPoolCommonExceptionHandler);
@@ -417,7 +419,7 @@ public void testGetDoesNotThrow() {
417419
assertDoesNotThrow(SystemProperties::getJdkXmlResetSymbolTable);
418420
assertDoesNotThrow(SystemProperties::getJdkXmlTotalEntitySizeLimit);
419421
assertDoesNotThrow(SystemProperties::getJdkXmlXsltcIsStandalone);
420-
assertDoesNotThrow(() -> SystemProperties.getLineSeparator());
422+
assertDoesNotThrow((ThrowingSupplier<String>) SystemProperties::getLineSeparator);
421423
assertDoesNotThrow(SystemProperties::getNativeEncoding);
422424
assertDoesNotThrow(SystemProperties::getNetworkAddressCacheNegativeTtl);
423425
assertDoesNotThrow(SystemProperties::getNetworkAddressCacheStaleTtl);
@@ -446,7 +448,7 @@ public void testGetDoesNotThrow() {
446448
assertDoesNotThrow(SystemProperties::getUserExtensions);
447449
assertDoesNotThrow(SystemProperties::getUserHome);
448450
assertDoesNotThrow(SystemProperties::getUserLanguage);
449-
assertDoesNotThrow(() -> SystemProperties.getUserName());
451+
assertDoesNotThrow((ThrowingSupplier<String>) SystemProperties::getUserName);
450452
assertDoesNotThrow(SystemProperties::getUserRegion);
451453
assertDoesNotThrow(SystemProperties::getUserScript);
452454
assertDoesNotThrow(SystemProperties::getUserTimezone);

0 commit comments

Comments
 (0)