summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-11-08 14:48:33 (EST)
committerEike Stepper2007-11-08 14:48:33 (EST)
commitf55f3cffc54ec02579cefbe3bf0d2b215f668ace (patch)
tree669da8687e97e36fa6de720e02454e0fdaaa93a3
parent13691c0a444d1bf75b36917d6adcca3fc139f4e4 (diff)
downloadcdo-f55f3cffc54ec02579cefbe3bf0d2b215f668ace.zip
cdo-f55f3cffc54ec02579cefbe3bf0d2b215f668ace.tar.gz
cdo-f55f3cffc54ec02579cefbe3bf0d2b215f668ace.tar.bz2
*** empty log message ***
-rw-r--r--plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java12
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferencePage.java1
2 files changed, 12 insertions, 1 deletions
diff --git a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
index 97a1c4a..899ff99 100644
--- a/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
+++ b/plugins/org.eclipse.net4j.db/src/org/eclipse/net4j/db/DBUtil.java
@@ -18,6 +18,7 @@ import org.eclipse.net4j.util.ReflectUtil;
import javax.sql.DataSource;
+import java.sql.Clob;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -311,6 +312,17 @@ public final class DBUtil
for (int i = 0; i < fields.length; i++)
{
values[i] = resultSet.getObject(i + 1);
+ if (values[i] instanceof Clob)
+ {
+ Clob clob = (Clob)values[i];
+ long length = clob.length();
+ if (length > Integer.MAX_VALUE)
+ {
+ throw new IllegalStateException("String too long: " + length);
+ }
+
+ values[i] = clob.getSubString(1, (int)length);
+ }
}
proceed = rowHandler.handle(rows++, values);
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferencePage.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferencePage.java
index 586d106..5b25775 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferencePage.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/prefs/OMPreferencePage.java
@@ -89,7 +89,6 @@ public abstract class OMPreferencePage extends PreferencePage implements IWorkbe
protected void dialogChanged()
{
- System.out.println("CHANGED");
}
@Override