db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r1214423 - /db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
Date Wed, 14 Dec 2011 19:46:59 GMT
Author: dag
Date: Wed Dec 14 19:46:59 2011
New Revision: 1214423

URL: http://svn.apache.org/viewvc?rev=1214423&view=rev
Log:
DERBY-5535 Remove unused methods from client's CrossConverters class

Patch derby-5535 removes the unused methods.


Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java?rev=1214423&r1=1214422&r2=1214423&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/CrossConverters.java Wed Dec
14 19:46:59 2011
@@ -973,10 +973,6 @@ final class CrossConverters {
         return source != 0;
     }
 
-    final boolean getBooleanFromBigDecimal(java.math.BigDecimal source) throws SqlException
{
-        return source.intValue() != 0;
-    }
-
     /**
      * <p>
      * Get a boolean value from a CHAR column. In order to match the embedded
@@ -1046,14 +1042,6 @@ final class CrossConverters {
         return (byte) source;
     }
 
-    final byte getByteFromBigDecimal(java.math.BigDecimal source) throws SqlException {
-        if (Configuration.rangeCheckCrossConverters &&
-                (source.compareTo(bdMaxByteValue__) == 1 || source.compareTo(bdMinByteValue__)
== -1)) {
-            throw new LossOfPrecisionConversionException(agent_.logWriter_, String.valueOf(source));
-        }
-        return (byte) source.intValue();
-    }
-
     final byte getByteFromBoolean(boolean source) throws SqlException {
         return source ? (byte) 1 : (byte) 0;
     }
@@ -1106,14 +1094,6 @@ final class CrossConverters {
         return (short) source;
     }
 
-    final short getShortFromBigDecimal(java.math.BigDecimal source) throws SqlException {
-        if (Configuration.rangeCheckCrossConverters &&
-                (source.compareTo(bdMaxShortValue__) == 1 || source.compareTo(bdMinShortValue__)
== -1)) {
-            throw new LossOfPrecisionConversionException(agent_.logWriter_, String.valueOf(source));
-        }
-        return (short) source.intValue();
-    }
-
     final short getShortFromBoolean(boolean source) throws SqlException {
         return source ? (short) 1 : (short) 0;
     }
@@ -1158,14 +1138,6 @@ final class CrossConverters {
         return (int) source;
     }
 
-    final int getIntFromBigDecimal(java.math.BigDecimal source) throws SqlException {
-        if (Configuration.rangeCheckCrossConverters &&
-                (source.compareTo(bdMaxIntValue__) == 1 || source.compareTo(bdMinIntValue__)
== -1)) {
-            throw new LossOfPrecisionConversionException(agent_.logWriter_, String.valueOf(source));
-        }
-        return source.intValue();
-    }
-
     final int getIntFromBoolean(boolean source) throws SqlException {
         return source ? (int) 1 : (int) 0;
     }
@@ -1200,14 +1172,6 @@ final class CrossConverters {
         return (long) source;
     }
 
-    final long getLongFromBigDecimal(java.math.BigDecimal source) throws SqlException {
-        if (Configuration.rangeCheckCrossConverters &&
-                (source.compareTo(bdMaxLongValue__) == 1 || source.compareTo(bdMinLongValue__)
== -1)) {
-            throw new LossOfPrecisionConversionException(agent_.logWriter_, String.valueOf(source));
-        }
-        return source.longValue();
-    }
-
     final long getLongFromBoolean(boolean source) throws SqlException {
         return source ? (long) 1 : (long) 0;
     }
@@ -1233,14 +1197,6 @@ final class CrossConverters {
         return (float) source;
     }
 
-    final float getFloatFromBigDecimal(java.math.BigDecimal source) throws SqlException {
-        if (Configuration.rangeCheckCrossConverters &&
-                (source.compareTo(bdMaxFloatValue__) == 1 || source.compareTo(bdMinFloatValue__)
== -1)) {
-            throw new LossOfPrecisionConversionException(agent_.logWriter_, String.valueOf(source));
-        }
-        return source.floatValue();
-    }
-
     final float getFloatFromBoolean(boolean source) throws SqlException {
         return source ? (float) 1 : (float) 0;
     }
@@ -1257,14 +1213,6 @@ final class CrossConverters {
 
     //---------------------------- getDouble*() methods --------------------------
 
-    final double getDoubleFromBigDecimal(java.math.BigDecimal source) throws SqlException
{
-        if (Configuration.rangeCheckCrossConverters &&
-                (source.compareTo(bdMaxDoubleValue__) == 1 || source.compareTo(bdMinDoubleValue__)
== -1)) {
-            throw new LossOfPrecisionConversionException(agent_.logWriter_, String.valueOf(source));
-        }
-        return source.doubleValue();
-    }
-
     final double getDoubleFromBoolean(boolean source) throws SqlException {
         return source ? (double) 1 : (double) 0;
     }



Mime
View raw message