aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2019-10-02 11:36:05 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2019-10-02 11:36:05 +0200
commit430a34e6e19bbded0615ffb6952103896ba09682 (patch)
tree4eb12b74e91ba003d2a8316db12c88be033576b5 /org.eclipse.jgit
parent35339b455e0021fa2075aa29952596cdb22e37dd (diff)
parentca207cd3aed3ca529bc20e0b4805a69de25ee107 (diff)
downloadjgit-430a34e6e19bbded0615ffb6952103896ba09682.tar.gz
jgit-430a34e6e19bbded0615ffb6952103896ba09682.zip
Merge branch 'stable-5.3' into stable-5.4
* stable-5.3: Prepare 5.3.7-SNAPSHOT builds JGit v5.3.6.201910020505-r Prepare 5.1.13-SNAPSHOT builds JGit v5.1.12.201910011832-r Do not rely on ArrayIndexOutOfBoundsException to detect end of input Change-Id: Ia621d06a9489ee276c793de9dd4a77f4ff19e2ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
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 71f863589d..16db717032 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -1494,12 +1494,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() {