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 2019/12/25 18:40:04 UTC
[GitHub] [httpcomponents-core] michael-o opened a new pull request #172:
Normalize TimeUnit in TimeValue's equals() and hashCode()
michael-o opened a new pull request #172: Normalize TimeUnit in TimeValue's equals() and hashCode()
URL: https://github.com/apache/httpcomponents-core/pull/172
This is my naive approach based on Gary's work.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[GitHub] [httpcomponents-core] michael-o commented on issue #172: Normalize
TimeUnit in TimeValue's equals() and hashCode()
Posted by GitBox <gi...@apache.org>.
michael-o commented on issue #172: Normalize TimeUnit in TimeValue's equals() and hashCode()
URL: https://github.com/apache/httpcomponents-core/pull/172#issuecomment-569069745
@garydgregory Let's agree that this will do for now. We can always improve implementation details. They aren't visible to the user anyway otherwise we won't be able to push another beta.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[GitHub] [httpcomponents-core] asfgit closed pull request #172: Normalize
TimeUnit in TimeValue's equals() and hashCode()
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #172: Normalize TimeUnit in TimeValue's equals() and hashCode()
URL: https://github.com/apache/httpcomponents-core/pull/172
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[GitHub] [httpcomponents-core] michael-o commented on issue #172: Normalize
TimeUnit in TimeValue's equals() and hashCode()
Posted by GitBox <gi...@apache.org>.
michael-o commented on issue #172: Normalize TimeUnit in TimeValue's equals() and hashCode()
URL: https://github.com/apache/httpcomponents-core/pull/172#issuecomment-569545375
@garydgregory I just have merged this one to have some progress for the next beta. I'd be happy to review a better approach of yours.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org
[GitHub] [httpcomponents-core] ok2c commented on a change in pull request
#172: Normalize TimeUnit in TimeValue's equals() and hashCode()
Posted by GitBox <gi...@apache.org>.
ok2c commented on a change in pull request #172: Normalize TimeUnit in TimeValue's equals() and hashCode()
URL: https://github.com/apache/httpcomponents-core/pull/172#discussion_r361410189
##########
File path: httpcore5/src/main/java/org/apache/hc/core5/util/TimeValue.java
##########
@@ -274,8 +276,8 @@ public TimeUnit getTimeUnit() {
@Override
public int hashCode() {
int hash = LangUtils.HASH_SEED;
- hash = LangUtils.hashCode(hash, duration);
- hash = LangUtils.hashCode(hash, timeUnit);
+ hash = LangUtils.hashCode(hash, this.convert(TimeUnit.NANOSECONDS));
+ hash = LangUtils.hashCode(hash, TimeUnit.NANOSECONDS);
Review comment:
@michael-o `hash = LangUtils.hashCode(hash, TimeUnit.NANOSECONDS)` can be dropped as unnecessary.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org