You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by sebb <se...@gmail.com> on 2014/03/18 02:04:58 UTC

case-conversion: standardise on Locale.ROOT (1.6) or Locale.ENGLISH (1.6)

There are 83 instances of case conversion using a Locale (none
without) in HC project trunk

Of these, there are:

23 Locale.ENGLISH (includes 4 comments)
33 Locale.ROOT (Java 1.6+; httpasycclient currently uses 1.5)
27 Locale.US (httpclient/httpcore only)

It does not make sense to me to use US (or UK).
Although they are short, they are too specific.
ROOT is ideal, but is 1.6+

httpasyncclient only has 5 instances of Locale, two of which are comments.
It only uses ENGLISH.

I propose to convert the Locale instances in client and core to ROOT.
The httpasyncclient component can be done when it requires 1.6

OK?

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


Re: case-conversion: standardise on Locale.ROOT (1.6) or Locale.ENGLISH (1.6)

Posted by Gary Gregory <ga...@gmail.com>.
On Wed, Mar 19, 2014 at 9:08 PM, sebb <se...@gmail.com> wrote:

> On 18 March 2014 08:47, Oleg Kalnichevski <ol...@apache.org> wrote:
> > On Tue, 2014-03-18 at 01:04 +0000, sebb wrote:
> >> There are 83 instances of case conversion using a Locale (none
> >> without) in HC project trunk
> >>
> >> Of these, there are:
> >>
> >> 23 Locale.ENGLISH (includes 4 comments)
> >> 33 Locale.ROOT (Java 1.6+; httpasycclient currently uses 1.5)
> >> 27 Locale.US (httpclient/httpcore only)
> >>
> >> It does not make sense to me to use US (or UK).
> >> Although they are short, they are too specific.
> >> ROOT is ideal, but is 1.6+
> >>
> >> httpasyncclient only has 5 instances of Locale, two of which are
> comments.
> >> It only uses ENGLISH.
> >>
> >> I propose to convert the Locale instances in client and core to ROOT.
> >> The httpasyncclient component can be done when it requires 1.6
> >>
> >> OK?
> >>
> >
> > I think I have already changed all non-deprecated classes in core and
> > client to use Locale.ROOT. I see no point changing deprecated code.
>
> Two of the Locale.US references are in the java-deprecated tree.
> The rest are not in that tree.
>
> Given that there are only 2 deprecated references, I think it would
> make sense to change them anyway.
> Make checking the source easier.
>

I agree, and I like the consistency which avoid me wondering why is it done
one way here and another there...

Gary


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


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Re: case-conversion: standardise on Locale.ROOT (1.6) or Locale.ENGLISH (1.6)

Posted by sebb <se...@gmail.com>.
On 18 March 2014 08:47, Oleg Kalnichevski <ol...@apache.org> wrote:
> On Tue, 2014-03-18 at 01:04 +0000, sebb wrote:
>> There are 83 instances of case conversion using a Locale (none
>> without) in HC project trunk
>>
>> Of these, there are:
>>
>> 23 Locale.ENGLISH (includes 4 comments)
>> 33 Locale.ROOT (Java 1.6+; httpasycclient currently uses 1.5)
>> 27 Locale.US (httpclient/httpcore only)
>>
>> It does not make sense to me to use US (or UK).
>> Although they are short, they are too specific.
>> ROOT is ideal, but is 1.6+
>>
>> httpasyncclient only has 5 instances of Locale, two of which are comments.
>> It only uses ENGLISH.
>>
>> I propose to convert the Locale instances in client and core to ROOT.
>> The httpasyncclient component can be done when it requires 1.6
>>
>> OK?
>>
>
> I think I have already changed all non-deprecated classes in core and
> client to use Locale.ROOT. I see no point changing deprecated code.

Two of the Locale.US references are in the java-deprecated tree.
The rest are not in that tree.

Given that there are only 2 deprecated references, I think it would
make sense to change them anyway.
Make checking the source easier.

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

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


Re: case-conversion: standardise on Locale.ROOT (1.6) or Locale.ENGLISH (1.6)

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, 2014-03-18 at 01:04 +0000, sebb wrote:
> There are 83 instances of case conversion using a Locale (none
> without) in HC project trunk
> 
> Of these, there are:
> 
> 23 Locale.ENGLISH (includes 4 comments)
> 33 Locale.ROOT (Java 1.6+; httpasycclient currently uses 1.5)
> 27 Locale.US (httpclient/httpcore only)
> 
> It does not make sense to me to use US (or UK).
> Although they are short, they are too specific.
> ROOT is ideal, but is 1.6+
> 
> httpasyncclient only has 5 instances of Locale, two of which are comments.
> It only uses ENGLISH.
> 
> I propose to convert the Locale instances in client and core to ROOT.
> The httpasyncclient component can be done when it requires 1.6
> 
> OK?
> 

I think I have already changed all non-deprecated classes in core and
client to use Locale.ROOT. I see no point changing deprecated code.

Oleg



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