ok2c commented on code in PR #464:
URL: 
https://github.com/apache/httpcomponents-client/pull/464#discussion_r1244819488


##########
httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CachingExec.java:
##########
@@ -165,9 +167,11 @@ public ClassicHttpResponse execute(
             setResponseStatus(context, 
CacheResponseStatus.CACHE_MODULE_RESPONSE);
             return new BasicClassicHttpResponse(HttpStatus.SC_NOT_IMPLEMENTED);
         }
-        final HttpCacheEntry entry = responseCache.getCacheEntry(target, 
request);
+        final CacheMatch result = responseCache.match(target, request);
+        final CacheHit hit = result != null ? result.hit : null;
+        final CacheHit root = result != null ? result.root : null;
 
-        final SimpleHttpResponse fatalErrorResponse = 
getFatallyNonCompliantResponse(request, context, entry != null);
+        final SimpleHttpResponse fatalErrorResponse = 
getFatallyNonCompliantResponse(request, context, hit != null);

Review Comment:
   @arturobernalg This is a matter of taste. I find `hit != null` clearer but 
it is just me. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to