db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpoes...@apache.org
Subject cvs commit: db-torque/xdocs changes.xml
Date Thu, 11 Sep 2003 19:14:40 GMT
mpoeschl    2003/09/11 12:14:40

  Modified:    src/test/org/apache/torque/om NumberKeyTest.java
               src/java/org/apache/torque/om NumberKey.java
               xdocs    changes.xml
  Log:
  TRQS180: NumberKey long constructor introduces rounding errors
  
  Revision  Changes    Path
  1.4       +9 -1      db-torque/src/test/org/apache/torque/om/NumberKeyTest.java
  
  Index: NumberKeyTest.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/test/org/apache/torque/om/NumberKeyTest.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NumberKeyTest.java	13 Sep 2002 02:43:09 -0000	1.3
  +++ NumberKeyTest.java	11 Sep 2003 19:14:40 -0000	1.4
  @@ -151,4 +151,12 @@
           Assert.assertEquals(n2a, array[2]);
       }
       
  +    /**
  +     * Test long constructor
  +     */
  +    public void testLongConstructor()
  +    {
  +        NumberKey key = new NumberKey(9900000000000001L);
  +        assertEquals("9900000000000001", key.toString());
  +    }    
   }
  
  
  
  1.20      +2 -2      db-torque/src/java/org/apache/torque/om/NumberKey.java
  
  Index: NumberKey.java
  ===================================================================
  RCS file: /home/cvs/db-torque/src/java/org/apache/torque/om/NumberKey.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- NumberKey.java	25 Aug 2003 21:42:40 -0000	1.19
  +++ NumberKey.java	11 Sep 2003 19:14:40 -0000	1.20
  @@ -120,7 +120,7 @@
        */
       public NumberKey(long key)
       {
  -        this.key = new BigDecimal(key);
  +        this.key = BigDecimal.valueOf(key);
       }
   
       /**
  
  
  
  1.112     +3 -0      db-torque/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/db-torque/xdocs/changes.xml,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- changes.xml	8 Sep 2003 23:14:44 -0000	1.111
  +++ changes.xml	11 Sep 2003 19:14:40 -0000	1.112
  @@ -9,6 +9,9 @@
   
       <release version="3.2-alpha" date="in CVS">
   
  +      <action dev='mpoeschl' type='fix'>
  +        TRQS180: NumberKey long constructor introduces rounding errors.
  +      </action>
         <action dev='mpoeschl' type='remove'>
           Removed the deprecated connection pool (commons-dbcp is used as
           default since 3.1)
  
  
  

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


Mime
View raw message