From: Eugene M. <ema...@gm...> - 2009-06-11 18:19:58
|
Hi, I've got some data with some millisecond values that are like the following: <longTest> <creationTimeMillisecs>1241535599263</creationTimeMillisecs> <creationTimeMillisecs>1241121151513</creationTimeMillisecs> <creationTimeMillisecs>1241727627917</creationTimeMillisecs> <creationTimeMillisecs>1241535651217</creationTimeMillisecs> </longTest> As part of a query I wanted to find the max of these. The result would come out in scientific notation, stuff like: 1.241727627917E12 The output needed to be in a regular integer format though, like the originals. Applying xs:long to the value I get an error: FOCA0003: Value is out of range for type xs:integer Looking at the code, it looks like all the Integer conversions from Doubles are checked against Integer.MAX_VALUE, then converted to longs. Is there some reason it is not checking against Long.MAX_VALUE? The code I'm talking about is line 177 of DoubleValue.java from: http://exist.svn.sourceforge.net/viewvc/exist/trunk/eXist/src/org/exist/xquery/value/DoubleValue.java?revision=8202&view=markup See ya, Eugene |