Please review -XshowSettings a java launcher option.
Kumar Srinivasan
kumar.x.srinivasan at oracle.com
Fri Nov 12 15:40:13 UTC 2010
Hi Sherman,
>
> The scaleValue(longv) does not appear to handle the 1K, 1M, 1G and 1T
> correctly, shouldn't
> be v >= K/M/G/T ? 1024 for 1K is OK, byte number for 1M/G/T might be
> too much.
I fixed this in my local repo, also Joe suggested I use BigDecimal to
round off
and set precision.
>
> Seems like you are "assembling" the bits yourself, why not use our
> "powerful" (sure, a little slower:-)
> j.u.Formatter, get a Formatter on top of a sb
>
> StringBuilder sb = new StringBuilder();
> Formatter fm = new Formatter(sb);
I am using String.format. will send the new webrev shortly.
Kumar
> ...
>
> then pass the fm around and finally dump the sb.toString() to the
> out/err. This way you will
> have better control of the "spacing", the \n (with "%n") and might
> also bring in some "locale"
> sensitive benefits (maybe in the future).
>
> -Sherman
>
>
> On 11/11/2010 13:56, Kumar Srinivasan wrote:
>> Hi All,
>>
>> Please review the following:
>>
>> http://cr.openjdk.java.net/~ksrini/6452854/webrev.00/
>>
>> This will print all the known settings/properties/locales
>> supported and known to Java, this has been a long standing request.
>>
>> A sample output attached below.
>>
>> Note: the -X option specifically is being used so we can evolve this
>> option
>> and add more useful information, in future versions of java.
>>
>> Thanks
>> Kumar
>>
>>
>>
>
More information about the core-libs-dev
mailing list