You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2021/11/21 16:43:10 UTC

[GitHub] [httpcomponents-client] michael-o commented on a change in pull request #329: Use Time APIs for date in the Request.java and Warning value.

michael-o commented on a change in pull request #329:
URL: https://github.com/apache/httpcomponents-client/pull/329#discussion_r753825625



##########
File path: httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/ResponseProtocolCompliance.java
##########
@@ -101,8 +100,8 @@ private void warningsWithNonMatchingWarnDatesAreRemoved(
         boolean modified = false;
         for(final Header h : warningHeaders) {
             for(final WarningValue wv : WarningValue.getWarningValues(h)) {
-                final Date warnDate = wv.getWarnDate();
-                if (warnDate == null || warnDate.equals(responseDate)) {
+                final Instant warnInstant = wv.getWarnInstant();
+                if (warnInstant == null || warnInstant.equals(responseDate)) {
                     newWarningHeaders.add(new BasicHeader(HeaderConstants.WARNING,wv.toString()));

Review comment:
       A bit confusing, `getWarnDate()` has been renamed, but `responseDate` not?




-- 
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: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org