You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Adrian Crum <ad...@sandglass-software.com> on 2013/09/14 01:43:19 UTC
[ALL] Re: [jira] [Created] (SANDBOX-461) FloatToString
I need someone to grant me permission to manage Jira sandbox issues. My
Jira login ID is adrianc@hlmksw.com
Thanks!
Adrian Crum
Sandglass Software
www.sandglass-software.com
On 9/13/2013 3:48 PM, Brad Davis (JIRA) wrote:
> Brad Davis created SANDBOX-461:
> ----------------------------------
>
> Summary: FloatToString
> Key: SANDBOX-461
> URL: https://issues.apache.org/jira/browse/SANDBOX-461
> Project: Commons Sandbox
> Issue Type: Bug
> Components: Convert
> Affects Versions: Nightly Builds
> Reporter: Brad Davis
>
>
> FloatToString seems to return unexpected results.
>
> Test Case:
> @Test
> public void testFloatFormat() throws Exception {
> Float testFloat = new Float(100.1878783420);
> FloatToString fts = new FloatToString();
>
> String format = "###.##";
> String v1 = fts.convert(new Float(100.1878783420), Locale.US, TimeZone.getDefault(), format);
>
> NumberFormat nf = new DecimalFormat("###.##");
> String v2 = nf.format(testFloat.floatValue());
>
> Assert.assertEquals("100.19", v1);
> Assert.assertEquals("100.19", v2);
>
>
> }
>
>
> This class may be the cause:
> public static abstract class AbstractNumberConverter<S, T> extends AbstractLocalizedConverter<S, T> {
>
> It seems to drop the "format" string.
>
>
> Also, the method:
> protected String format(Float obj, NumberFormat nf) throws ConversionException {
>
> Should be made public to work around the issue if you want to , for example, provide the DecimalFormat to the converter.
>
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [KARMA] Re: [jira] [Created] (SANDBOX-461) FloatToString
Posted by Adrian Crum <ad...@sandglass-software.com>.
It works. Thanks!
Adrian Crum
Sandglass Software
www.sandglass-software.com
On 9/14/2013 12:06 PM, Luc Maisonobe wrote:
> Hi Adrian,
>
> Le 14/09/2013 16:37, Adrian Crum a écrit :
>> I need someone to grant me permission to manage Jira sandbox issues. My
>> Jira login ID is adrianc@hlmksw.com
>
> Could you check if ti works now?
>
> Luc
>
>>
>> Thanks!
>>
>> Adrian Crum
>> Sandglass Software
>> www.sandglass-software.com
>>
>>> On 9/13/2013 3:48 PM, Brad Davis (JIRA) wrote:
>>>> Brad Davis created SANDBOX-461:
>>>> ----------------------------------
>>>>
>>>> Summary: FloatToString
>>>> Key: SANDBOX-461
>>>> URL: https://issues.apache.org/jira/browse/SANDBOX-461
>>>> Project: Commons Sandbox
>>>> Issue Type: Bug
>>>> Components: Convert
>>>> Affects Versions: Nightly Builds
>>>> Reporter: Brad Davis
>>>>
>>>>
>>>> FloatToString seems to return unexpected results.
>>>>
>>>> Test Case:
>>>> @Test
>>>> public void testFloatFormat() throws Exception {
>>>> Float testFloat = new Float(100.1878783420);
>>>> FloatToString fts = new FloatToString();
>>>>
>>>> String format = "###.##";
>>>> String v1 = fts.convert(new Float(100.1878783420), Locale.US,
>>>> TimeZone.getDefault(), format);
>>>>
>>>> NumberFormat nf = new DecimalFormat("###.##");
>>>> String v2 = nf.format(testFloat.floatValue());
>>>>
>>>> Assert.assertEquals("100.19", v1);
>>>> Assert.assertEquals("100.19", v2);
>>>>
>>>>
>>>> }
>>>>
>>>>
>>>> This class may be the cause:
>>>> public static abstract class AbstractNumberConverter<S, T> extends
>>>> AbstractLocalizedConverter<S, T> {
>>>>
>>>> It seems to drop the "format" string.
>>>>
>>>>
>>>> Also, the method:
>>>> protected String format(Float obj, NumberFormat nf) throws
>>>> ConversionException {
>>>>
>>>> Should be made public to work around the issue if you want to , for
>>>> example, provide the DecimalFormat to the converter.
>>>>
>>>>
>>>> --
>>>> This message is automatically generated by JIRA.
>>>> If you think it was sent incorrectly, please contact your JIRA
>>>> administrators
>>>> For more information on JIRA, see:
>>>> http://www.atlassian.com/software/jira
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [KARMA] Re: [jira] [Created] (SANDBOX-461) FloatToString
Posted by Luc Maisonobe <Lu...@free.fr>.
Hi Adrian,
Le 14/09/2013 16:37, Adrian Crum a écrit :
> I need someone to grant me permission to manage Jira sandbox issues. My
> Jira login ID is adrianc@hlmksw.com
Could you check if ti works now?
Luc
>
> Thanks!
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
>> On 9/13/2013 3:48 PM, Brad Davis (JIRA) wrote:
>>> Brad Davis created SANDBOX-461:
>>> ----------------------------------
>>>
>>> Summary: FloatToString
>>> Key: SANDBOX-461
>>> URL: https://issues.apache.org/jira/browse/SANDBOX-461
>>> Project: Commons Sandbox
>>> Issue Type: Bug
>>> Components: Convert
>>> Affects Versions: Nightly Builds
>>> Reporter: Brad Davis
>>>
>>>
>>> FloatToString seems to return unexpected results.
>>>
>>> Test Case:
>>> @Test
>>> public void testFloatFormat() throws Exception {
>>> Float testFloat = new Float(100.1878783420);
>>> FloatToString fts = new FloatToString();
>>>
>>> String format = "###.##";
>>> String v1 = fts.convert(new Float(100.1878783420), Locale.US,
>>> TimeZone.getDefault(), format);
>>>
>>> NumberFormat nf = new DecimalFormat("###.##");
>>> String v2 = nf.format(testFloat.floatValue());
>>>
>>> Assert.assertEquals("100.19", v1);
>>> Assert.assertEquals("100.19", v2);
>>>
>>>
>>> }
>>>
>>>
>>> This class may be the cause:
>>> public static abstract class AbstractNumberConverter<S, T> extends
>>> AbstractLocalizedConverter<S, T> {
>>>
>>> It seems to drop the "format" string.
>>>
>>>
>>> Also, the method:
>>> protected String format(Float obj, NumberFormat nf) throws
>>> ConversionException {
>>>
>>> Should be made public to work around the issue if you want to , for
>>> example, provide the DecimalFormat to the converter.
>>>
>>>
>>> --
>>> This message is automatically generated by JIRA.
>>> If you think it was sent incorrectly, please contact your JIRA
>>> administrators
>>> For more information on JIRA, see:
>>> http://www.atlassian.com/software/jira
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
[KARMA] Re: [jira] [Created] (SANDBOX-461) FloatToString
Posted by Adrian Crum <ad...@sandglass-software.com>.
I need someone to grant me permission to manage Jira sandbox issues. My
Jira login ID is adrianc@hlmksw.com
Thanks!
Adrian Crum
Sandglass Software
www.sandglass-software.com
> On 9/13/2013 3:48 PM, Brad Davis (JIRA) wrote:
>> Brad Davis created SANDBOX-461:
>> ----------------------------------
>>
>> Summary: FloatToString
>> Key: SANDBOX-461
>> URL: https://issues.apache.org/jira/browse/SANDBOX-461
>> Project: Commons Sandbox
>> Issue Type: Bug
>> Components: Convert
>> Affects Versions: Nightly Builds
>> Reporter: Brad Davis
>>
>>
>> FloatToString seems to return unexpected results.
>>
>> Test Case:
>> @Test
>> public void testFloatFormat() throws Exception {
>> Float testFloat = new Float(100.1878783420);
>> FloatToString fts = new FloatToString();
>>
>> String format = "###.##";
>> String v1 = fts.convert(new Float(100.1878783420), Locale.US,
>> TimeZone.getDefault(), format);
>>
>> NumberFormat nf = new DecimalFormat("###.##");
>> String v2 = nf.format(testFloat.floatValue());
>>
>> Assert.assertEquals("100.19", v1);
>> Assert.assertEquals("100.19", v2);
>>
>>
>> }
>>
>>
>> This class may be the cause:
>> public static abstract class AbstractNumberConverter<S, T> extends
>> AbstractLocalizedConverter<S, T> {
>>
>> It seems to drop the "format" string.
>>
>>
>> Also, the method:
>> protected String format(Float obj, NumberFormat nf) throws
>> ConversionException {
>>
>> Should be made public to work around the issue if you want to , for
>> example, provide the DecimalFormat to the converter.
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> If you think it was sent incorrectly, please contact your JIRA
>> administrators
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org