arturobernalg commented on a change in pull request #329:
URL:
https://github.com/apache/httpcomponents-client/pull/329#discussion_r753826422
##########
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:
Hi @michael-o
surely you have. reason, but the idea is to do it in stages.
TY
##########
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:
Hi @michael-o
you are surely right, but the idea is to do it in stages.
TY
##########
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:
Thank you @michael-o
I just want avoid mistake and mess the code. My idea is make the apis
change progressively.
TY
--
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]