Author: adrianc
Date: Sun Dec  5 20:38:30 2010
New Revision: 1042437

URL: http://svn.apache.org/viewvc?rev=1042437&view=rev
Log:
Removed two unsupported converters.

A SerialBlob or SerialClob that is created from scratch will throw an exception 
if it is passed to a JDBC driver - because the created objects expect to 
contain a reference to the original Blob/Clob objects supplied by the JDBC 
driver.

Modified:
    
commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/MiscConverters.java

Modified: 
commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/MiscConverters.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/MiscConverters.java?rev=1042437&r1=1042436&r2=1042437&view=diff
==============================================================================
--- 
commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/MiscConverters.java
 (original)
+++ 
commons/sandbox/convert/trunk/src/main/java/org/apache/commons/convert/MiscConverters.java
 Sun Dec  5 20:38:30 2010
@@ -76,20 +76,6 @@ public class MiscConverters implements C
         }
     }
 
-    public static class ByteArrayToBlob extends AbstractConverter<byte[], 
Blob> {
-        public ByteArrayToBlob() {
-            super(byte[].class, Blob.class);
-        }
-
-        public Blob convert(byte[] obj) throws ConversionException {
-            try {
-                return new javax.sql.rowset.serial.SerialBlob(obj);
-            } catch (Exception e) {
-                throw new ConversionException(e);
-            }
-        }
-    }
-
     /**
      * An object that converts a byte array to a
      * <code>ByteBuffer</code>.
@@ -249,20 +235,6 @@ public class MiscConverters implements C
         }
     }
 
-    public static class StringToClob extends AbstractConverter<String, Clob> {
-        public StringToClob() {
-            super(String.class, Clob.class);
-        }
-
-        public Clob convert(String obj) throws ConversionException {
-            try {
-                return new 
javax.sql.rowset.serial.SerialClob(obj.toCharArray());
-            } catch (Exception e) {
-                throw new ConversionException(e);
-            }
-        }
-    }
-
     /**
      * An object that converts a format pattern <code>String</code> to a
      * <code>DecimalFormat</code>.


Reply via email to