diff options
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java index 4726975d07..6ab5c149ff 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java @@ -1465,12 +1465,10 @@ public class Config { } int read() { - try { - return buf[pos++]; - } catch (ArrayIndexOutOfBoundsException e) { - pos = buf.length; + if (pos >= buf.length) { return -1; } + return buf[pos++]; } void reset() { |