This is an automated email from the ASF dual-hosted git repository.

garydgregory 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 8bf8b7870 Reuse Suppliers.get()
8bf8b7870 is described below

commit 8bf8b78700c778b10049131f51b687195e039da9
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Aug 14 07:22:37 2026 -0400

    Reuse Suppliers.get()
---
 src/main/java/org/apache/commons/lang3/SystemProperties.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/lang3/SystemProperties.java 
b/src/main/java/org/apache/commons/lang3/SystemProperties.java
index 40f3621f7..3f1371487 100644
--- a/src/main/java/org/apache/commons/lang3/SystemProperties.java
+++ b/src/main/java/org/apache/commons/lang3/SystemProperties.java
@@ -3877,7 +3877,7 @@ public static String getOsVersion() {
      */
     public static Path getPath(final String key, final Supplier<Path> 
defaultIfAbsent) {
         final String str = getProperty(key);
-        return str == null ? defaultIfAbsent != null ? defaultIfAbsent.get() : 
null : Paths.get(str);
+        return str == null ? Suppliers.get(defaultIfAbsent) : Paths.get(str);
     }
 
     /**

Reply via email to