You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Unico Hommes (JIRA)" <ji...@apache.org> on 2014/12/06 12:16:12 UTC

[jira] [Commented] (JCR-3834) DecimalField calculates wrong string from BigDecimal with scale of Integer.MIN_VALUE

    [ https://issues.apache.org/jira/browse/JCR-3834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14236731#comment-14236731 ] 

Unico Hommes commented on JCR-3834:
-----------------------------------

Committed test case and skipping DecimalConvertTest#testRandomized because it fails on java 8.

> DecimalField calculates wrong string from BigDecimal with scale of Integer.MIN_VALUE
> ------------------------------------------------------------------------------------
>
>                 Key: JCR-3834
>                 URL: https://issues.apache.org/jira/browse/JCR-3834
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>            Reporter: Unico Hommes
>            Assignee: Unico Hommes
>
> The following test fails    
> public void testMinimumScale() {
>         final BigDecimal d1 = new BigDecimal(BigInteger.ONE, Integer.MIN_VALUE);
>         final BigDecimal d2 = new BigDecimal(BigInteger.ONE, Integer.MIN_VALUE+1);
>         final String s1 = DecimalField.decimalToString(d1);
>         final String s2 = DecimalField.decimalToString(d2);
>         assertEquals(Math.signum(d1.compareTo(d2)), Math.signum(s1.compareTo(s2)));
>     }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)