reta commented on a change in pull request #482: [CXF-7926] Initial MP Rest 
Client 1.2 impl
URL: https://github.com/apache/cxf/pull/482#discussion_r241993305
 
 

 ##########
 File path: 
rt/rs/microprofile-client/src/main/java/org/apache/cxf/microprofile/client/CxfTypeSafeClientBuilder.java
 ##########
 @@ -76,8 +132,32 @@ public RestClientBuilder executorService(ExecutorService 
executor) {
                 }
             }
         }
+
+        final String interfaceName = aClass.getName();
+        Optional<Long> timeout = ConfigFacade.getOptionalValue(
+            String.format(REST_CONN_TIMEOUT_FORMAT, interfaceName), 
Long.class).map(
+                timeoutValue -> {
+                    connectTimeout(timeoutValue, TimeUnit.MILLISECONDS);
+                    return timeoutValue;
+                });
+        if (!timeout.isPresent() && LOG.isLoggable(Level.FINEST)) {
+            LOG.finest("connectionTimeout set by MP Config: " + timeout.get());
 
 Review comment:
   Uh ... `timeout.get()` would blow up since `if` statement has 
`!timeout.isPresent()` ... Did you mean
   ```
   if (LOG.isLoggable(Level.FINEST)) {
               timeout.ifPresent(t -> 
                   LOG.finest("connectionTimeout set by MP Config: " + t)
               );
           };
   ```?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to