michael-o commented on a change in pull request #185: Httpcore 623 b http
connection is data available()
URL:
https://github.com/apache/httpcomponents-core/pull/185#discussion_r365609968
##########
File path: httpcore5/src/main/java/org/apache/hc/core5/util/Args.java
##########
@@ -167,6 +167,11 @@ public static long positive(final long n, final String
name) {
return n;
}
+ public static <T extends TimeValue> T positive(final T timeValue, final
String name) {
+ positive(timeValue.toMilliseconds(), name);
Review comment:
This can be dangerous because if someone supplies microsecond resolution it
will be 0 ms, thus will trigger an exception. You should rather use
`getDuration()`.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]