manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1572481 - in /manifoldcf/trunk: CHANGES.txt connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
Date Thu, 27 Feb 2014 09:23:37 GMT
Author: kwright
Date: Thu Feb 27 09:23:37 2014
New Revision: 1572481

URL: http://svn.apache.org/r1572481
Log:
Fix for CONNECTORS-904.

Modified:
    manifoldcf/trunk/CHANGES.txt
    manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1572481&r1=1572480&r2=1572481&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Thu Feb 27 09:23:37 2014
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 1.6-dev =====================
 
+CONNECTORS-904: JDBC Connector with MySQL should convert
+from binary columns to strings.
+(Karl Wright)
+
 CONNECTORS-903: Remove deprecation warnings from framework.
 (Karl Wright)
 

Modified: manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java?rev=1572481&r1=1572480&r2=1572481&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
(original)
+++ manifoldcf/trunk/connectors/jdbc/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/jdbc/JDBCConnector.java
Thu Feb 27 09:23:37 2014
@@ -1513,9 +1513,7 @@ public class JDBCConnector extends org.a
         // Consider this column to contain metadata.
         // We can only accept non-binary metadata at this time.
         Object metadata = row.getValue(columnName);
-        if (metadata instanceof BinaryInput)
-          throw new ManifoldCFException("Metadata column '"+columnName+"' must be convertible
to a string, and cannot be binary");
-        rd.addField(columnName,metadata.toString());
+        rd.addField(columnName,JDBCConnection.readAsString(metadata));
       }
     }
   }



Mime
View raw message