Changeset: 05a8260525d4 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=05a8260525d4
Modified Files:
        java/src/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
Branch: default
Log Message:

jdbc: fix compilation after wrong order of test and commit


diffs (28 lines):

diff --git a/java/src/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java 
b/java/src/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
--- a/java/src/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
+++ b/java/src/nl/cwi/monetdb/jdbc/MonetPreparedStatement.java
@@ -23,6 +23,7 @@
 import java.util.*;
 import java.net.URL;
 import java.io.*;
+import java.nio.*;
 import java.math.*;    // BigDecimal, etc.
 import java.text.SimpleDateFormat;
 
@@ -628,9 +629,13 @@
                int length)
                throws SQLException
        {
-               CharBuffer tmp = new CharBuffer(length);
-               reader.read(tmp);
-               setString(i, tmp.toString());
+               CharBuffer tmp = CharBuffer.allocate(length);
+               try {
+                       reader.read(tmp);
+               } catch (IOException e) {
+                       throw new SQLException(e.getMessage());
+               }
+               setString(parameterIndex, tmp.toString());
        }
 
        /**
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to