You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/06/25 12:35:53 UTC

(commons-lang) 01/02: Inline single use local variable

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

commit 3ea871d37d998b52c133fd3a2bcb3ea02ef7c55c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Jun 25 08:22:28 2025 -0400

    Inline single use local variable
---
 src/main/java/org/apache/commons/lang3/SystemProperties.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/lang3/SystemProperties.java b/src/main/java/org/apache/commons/lang3/SystemProperties.java
index e84e3c152..0b38ebab4 100644
--- a/src/main/java/org/apache/commons/lang3/SystemProperties.java
+++ b/src/main/java/org/apache/commons/lang3/SystemProperties.java
@@ -3759,8 +3759,7 @@ static String getProperty(final String property, final Supplier<String> defaultI
             if (StringUtils.isEmpty(property)) {
                 return Suppliers.get(defaultIfAbsent);
             }
-            final String value = System.getProperty(property);
-            return StringUtils.getIfEmpty(value, defaultIfAbsent);
+            return StringUtils.getIfEmpty(System.getProperty(property), defaultIfAbsent);
         } catch (final SecurityException ignore) {
             // We are not allowed to look at this property.
             //