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

johndament pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 92b01423fde572f35e88296bf70fc3b8e832fe7c
Author: John D. Ament <[email protected]>
AuthorDate: Tue Dec 19 16:32:50 2017 -0500

    [CXF-7579] Simplify config lookup.
---
 .../microprofile/client/MicroProfileClientConfigurableImpl.java  | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git 
a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientConfigurableImpl.java
 
b/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientConfigurableImpl.java
index ec28479..3df4246 100644
--- 
a/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientConfigurableImpl.java
+++ 
b/rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/MicroProfileClientConfigurableImpl.java
@@ -18,7 +18,6 @@
  */
 package org.apache.cxf.microprofile.client;
 
-import java.util.Optional;
 import javax.ws.rs.RuntimeType;
 import javax.ws.rs.client.ClientRequestFilter;
 import javax.ws.rs.client.ClientResponseFilter;
@@ -58,12 +57,8 @@ public class MicroProfileClientConfigurableImpl<C extends 
Configurable<C>>
             return (Boolean)prop;
         } else {
             Config config = ConfigProvider.getConfig();
-            Optional<Boolean> optionalValue = 
config.getOptionalValue(CONFIG_KEY_DISABLE_MAPPER,
-                    Boolean.class);
-            if (optionalValue.isPresent()) {
-                return optionalValue.get();
-            }
+            return config.getOptionalValue(CONFIG_KEY_DISABLE_MAPPER,
+                    Boolean.class).orElse(false);
         }
-        return false;
     }
 }

-- 
To stop receiving notification emails like this one, please contact
"[email protected]" <[email protected]>.

Reply via email to