diff src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java @ 180:fdf4c888d5b7

Small code and layout improvements
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 05 Oct 2017 17:01:17 +0200 (2017-10-05)
parents 8700d9ef2ace
children daa1a4c70879
line wrap: on
line diff
--- a/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
+++ b/src/main/java/nl/cwi/monetdb/jdbc/MonetResultSet.java
@@ -192,8 +192,8 @@ public class MonetResultSet
 
 	/**
 	 * Internal utility method to fill the JdbcSQLTypes array with derivable values.
-	 * By doing it once (in the constructor) we can avoid doing this in many getXyz() methods again and again
-	 * thereby improving getXyz() method performance.
+	 * By doing it once (in the constructor) we can avoid doing this in many getXyz()
+	 * methods again and again thereby improving getXyz() method performance.
 	 */
 	private void populateJdbcSQLtypesArray() {
 		MonetConnection connection = null;
@@ -203,15 +203,15 @@ public class MonetResultSet
 
 		for (int i = 0; i < types.length; i++) {
 			int javaSQLtype = MonetDriver.getJavaType(types[i]);
-			JdbcSQLTypes[i] = javaSQLtype;
 			if (javaSQLtype == Types.CLOB) {
 				if (connection != null && connection.mapClobAsVarChar())
-					JdbcSQLTypes[i] = Types.VARCHAR;
+					javaSQLtype = Types.VARCHAR;
 			} else
 			if (javaSQLtype == Types.BLOB) {
 				if (connection != null && connection.mapBlobAsVarBinary())
-					JdbcSQLTypes[i] = Types.VARBINARY;
+					javaSQLtype = Types.VARBINARY;
 			}
+			JdbcSQLTypes[i] = javaSQLtype;
 		}
 	}