You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by my...@apache.org on 2023/02/20 11:12:46 UTC

[incubator-eventmesh] branch master updated: [ISSUE #3082] Replaced orElse() with orElseGet() on line 61

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

mytang0 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new e6cb8af62 [ISSUE #3082] Replaced orElse() with orElseGet() on line 61
     new bb7f365fa Merge pull request #3218 from PickBas/fix-3082
e6cb8af62 is described below

commit e6cb8af62c3f843eff7947cc72db9c2bbad1fb78
Author: Kirill Saied <sa...@gmail.com>
AuthorDate: Mon Feb 20 10:07:54 2023 +0300

    [ISSUE #3082] Replaced orElse() with orElseGet() on line 61
---
 .../java/org/apache/eventmesh/common/config/convert/ConvertValue.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java
index e3870759d..a0ece2e6a 100644
--- a/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java
+++ b/eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java
@@ -58,7 +58,7 @@ public interface ConvertValue<T> {
         String fieldName = configFiled.field();
 
         if (StringUtils.isBlank(value) && !StringUtils.isBlank(fieldName) && findEnv) {
-            value = Optional.ofNullable(System.getProperty(fieldName)).orElse(System.getenv(fieldName));
+            value = Optional.ofNullable(System.getProperty(fieldName)).orElseGet(() -> System.getenv(fieldName));
         }
 
         if (StringUtils.isBlank(value) && configFiled.notEmpty()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org