Resolves 8221: StringIndexOutOfBoundsException when parsing a PostgreSQL Timestamp

This commit is contained in:
Bernardo Gomez Palacio 2019-01-15 10:51:57 -08:00
parent 3217159669
commit f59e48fd23

View File

@ -2617,7 +2617,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
int pos = position[0];
int length;
for (length = 0; length < maxLength && length < string.length(); length++) {
for (length = 0; length < maxLength && (pos + length) < string.length(); length++) {
int digit = string.charAt(pos + length) - '0';
if (digit >= 0 && digit < 10)