andymc12 commented on a change in pull request #703:
URL: https://github.com/apache/cxf/pull/703#discussion_r499303451
##########
File path:
systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
##########
@@ -926,15 +926,12 @@ public void testCachingExpiresUsingETag() throws
Exception {
// Now make a second call. The value in the clients cache will have
expired, so it should call
// out to the service, which will return 304, and the client will
re-use the cached payload
Review comment:
I took that to mean that the client should keep on using the same `Book`
entity that it read from the first Response, but now that you mention it, it
isn't very clear.
I think we can either update the text of the comment to indicate that the
client process should re-use the previously obtained entity, or we could add
`response.bufferEntity()` and then pull the entity from the original response -
something like this:
```
Response response2 = target.request().get();
assertEquals(304, response2.getStatus());
assertFalse(response2.hasEntity());
Book book2 = response.readEntity(Book.class);
assertEquals(123L, book2.getId());
cacheControlFeature.close();
```
Wdyt?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]