db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: JIRA JDO-104
Date Thu, 28 Jul 2005 17:19:58 GMT
Hi,

I've attached a patch for this issue for your review.  It replaces all 
occurences of  Double.MAX_VALUE, Double.MIN_VALUE, Float.MAX_VALUE, and 
Float.MIN_VALUE with AllTypes.DOUBLE_LARGEST, AllTypes.DOUBLE_SMALLEST, 
AllTypes.FLOAT_LARGEST, AllTypes.FLOAT_SMALLEST, respectively.

-- Michelle

Craig Russell wrote:

> Hi Andy,
>
> On Jul 27, 2005, at 11:07 AM, Andy Jefferson wrote:
>
>> In reference to the Collection/List/Set tests failing with errors 
>> such as :-
>>
>> test(org.apache.jdo.tck.models.fieldtypes.TestArrayListCollections)javax.jdo.JDODataStoreException:

>> ERROR 22003: The resulting value is outside the range for the data type 
>> DOUBLE.
>>
>> The test is trying to use a Collection of doubles, and insert Java 
>> values of 
>> Double.MAX_SIZE into a Derby DOUBLE column, which will always be 
>> touch and go 
>> with rounding issues etc (and whether the RDBMS in question complains 
>> when 
>> the value is just outside its range, which Derby does, but MySQL 
>> doesn't).
>>
>> I look at the TestFieldsOfDouble and see that the largest value used 
>> in that 
>> test for a Double is AllTypes.DOUBLE_LARGEST  =  9999999999999.9
>> Should we not be using the same values (whatever they are) in the 
>> collection/list/set tests, so we have consistency ?
>
>
> Yes, this was an oversight. We intended that DOUBLE_LARGEST would be 
> used instead of the Double.MAX_SIZE.
>
> If you have a patch I'd be happy to recommend the change.
>
> Craig
>
>>
>>
>>
>>
>> -- 
>> Andy
>>
>
> Craig Russell
>
> Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
>
> 408 276-5638 mailto:Craig.Russell@sun.com
>
> P.S. A good JDO? O, Gasp!
>
>


Mime
View raw message