[ 
https://issues.apache.org/jira/browse/JCR-3834?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Reschke updated JCR-3834:
--------------------------------
    Description: 
The following test fails    
{noformat}
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)));
    }
{noformat}

  was:
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)));
    }


> 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
>
> The following test fails    
> {noformat}
> 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)));
>     }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to