You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2019/11/04 13:55:00 UTC
[jira] [Comment Edited] (HTTPCORE-611) Minor glitches with
TimeValue
[ https://issues.apache.org/jira/browse/HTTPCORE-611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16966671#comment-16966671 ]
Gary D. Gregory edited comment on HTTPCORE-611 at 11/4/19 1:54 PM:
-------------------------------------------------------------------
I am happy with the code as it is now. I've applied changes per [~michael-o]'s review, thank you [~michael-o] for that.
I disagree with the comment about not using "%,d". I feel it is much nicer to have the "," or "." (depending on your locale) separator in messages.
Using another separator like a space looks horrible, no matter what some PDF says.
was (Author: garydgregory):
I am happy with the code as it is now. I've applied changes per [~michael-o]'s review, thank you [~michael-o] for that.
I disagree with the comment about not using "%,d". I feel it is much nicer to have the "," or "." (depending on your locale) separator in messages.
Using another separator like a space looks horrible, no matter and some PDF says.
> Minor glitches with TimeValue
> -----------------------------
>
> Key: HTTPCORE-611
> URL: https://issues.apache.org/jira/browse/HTTPCORE-611
> Project: HttpComponents HttpCore
> Issue Type: Improvement
> Components: HttpCore
> Affects Versions: 5.0-beta9
> Reporter: Michael Osipov
> Assignee: Gary D. Gregory
> Priority: Major
> Fix For: 5.0-beta11
>
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> The {{TimeValue}} looks like a very good thing. Some nits can be improved:
> * {{NEG_ONE_*SECONDS}} uses plural for the scale of one, but should use singular
> * {{defaultsToZeroMillis}} is not consistent with {{defaultsToNegativeOneSecond}}. It should be {{defaultsToZeroMilliseconds}}
> * {{parse()}} uses {{String.format()}} but never passes value to the format. {{%s}} is missing.
> * {{parse()}} should parse with {{Long.parseLong()}} instead of a biased locale. 1,200 SECONDS for me is one second and 200 milliseconds. Thus, it should be language agnostic.
> * {{toString()}} should also do at most {{%d}} or {{%s}}.
> * {{toMillis()}} and other second fractions use inconsistent naming. I'd expect it to be {{toMilliseconds()}} and so forth.
> [~ggregory]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org