You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by jo...@apache.org on 2017/12/19 21:32:56 UTC
[cxf] branch mp-client updated: [CXF-7579] Simplify config lookup.
This is an automated email from the ASF dual-hosted git repository.
johndament pushed a commit to branch mp-client
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/mp-client by this push:
new 7517eff [CXF-7579] Simplify config lookup.
7517eff is described below
commit 7517eff972d45fe3d806875da979d313a66f97b7
Author: John D. Ament <jo...@apache.org>
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
['"commits@cxf.apache.org" <co...@cxf.apache.org>'].