summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java6
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 b666f21d0b..ba3160ff76 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -1457,12 +1457,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() {