db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From be...@apache.org
Subject svn commit: r407519 - in /db/derby/code/branches/10.1/java: client/org/apache/derby/client/am/CrossConverters.java engine/org/apache/derby/iapi/types/SQLDouble.java
Date Thu, 18 May 2006 11:05:07 GMT
Author: bernt
Date: Thu May 18 04:05:06 2006
New Revision: 407519

URL: http://svn.apache.org/viewvc?rev=407519&view=rev
Log:
DERBY-1136 Merge command: svn merge -r  388160:388161 https://svn.apache.org/repos/asf/db/derby/code/trunk
Originally submitted by HÃ¥vard Mork

Modified:
    db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/CrossConverters.java
    db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/SQLDouble.java

Modified: db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/CrossConverters.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/CrossConverters.java?rev=407519&r1=407518&r2=407519&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/CrossConverters.java
(original)
+++ db/derby/code/branches/10.1/java/client/org/apache/derby/client/am/CrossConverters.java
Thu May 18 04:05:06 2006
@@ -1074,7 +1074,7 @@
 
     final float getFloatFromDouble(double source) throws SqlException {
         if (Configuration.rangeCheckCrossConverters &&
-                (source > Float.MAX_VALUE || source < -Float.MAX_VALUE)) {
+                Float.isInfinite((float)source)) {
             throw new LossOfPrecisionConversionException(agent_.logWriter_, String.valueOf(source));
         }
 

Modified: db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/SQLDouble.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/SQLDouble.java?rev=407519&r1=407518&r2=407519&view=diff
==============================================================================
--- db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/SQLDouble.java (original)
+++ db/derby/code/branches/10.1/java/engine/org/apache/derby/iapi/types/SQLDouble.java Thu
May 18 04:05:06 2006
@@ -134,7 +134,7 @@
 	 */
 	public float	getFloat() throws StandardException
 	{
-		if (Math.abs(value) > Float.MAX_VALUE)
+		if (Float.isInfinite((float)value))
 			throw StandardException.newException(SQLState.LANG_OUTSIDE_RANGE_FOR_DATATYPE, TypeId.REAL_NAME);
 		return (float) value;
 	}



Mime
View raw message