diff --git a/jOOQ/src/main/java/org/jooq/impl/Utils.java b/jOOQ/src/main/java/org/jooq/impl/Utils.java index 94f5ecec52..26b34cc08d 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Utils.java +++ b/jOOQ/src/main/java/org/jooq/impl/Utils.java @@ -733,10 +733,10 @@ final class Utils { if (peek(sqlChars, i, "--")) { // Consume the complete comment - for (; sqlChars[i] != '\r' && sqlChars[i] != '\n'; render.sql(sqlChars[i++])); + for (; i < sqlChars.length && sqlChars[i] != '\r' && sqlChars[i] != '\n'; render.sql(sqlChars[i++])); // Consume the newline character - render.sql(sqlChars[i]); + if (i < sqlChars.length) render.sql(sqlChars[i]); } // [#1797] Skip content inside of multi-line comments, e.g. @@ -1739,7 +1739,7 @@ final class Utils { return (T) wasNull(rs, Boolean.valueOf(rs.getBoolean(index))); } else if (type == BigInteger.class) { - // The SQLite JDBC driver doesn't support BigDecimals + // The SQLite JDBC driver doesn't support BigDecimals if (ctx.getDialect() == SQLDialect.SQLITE) { return Convert.convert(rs.getString(index), (Class) BigInteger.class); }