Fix IndexOutOfBoundsException from GithubValueParser

This commit is contained in:
Kris De Volder
2019-05-15 11:25:23 -07:00
parent 1e07fd438e
commit 30f8e2d48c
2 changed files with 14 additions and 1 deletions

View File

@@ -89,7 +89,7 @@ public class GithubValueParsers {
for (String expectedPrefix : GithubRepoContentAssistant.URI_PREFIXES) {
int lastChar = expectedPrefix.length()-1;
if (str.startsWith(expectedPrefix.substring(0, lastChar))) {
char actualSeparator = str.charAt(lastChar);
char actualSeparator = str.safeCharAt(lastChar);
char expectedSeparator = expectedPrefix.charAt(lastChar);
if (actualSeparator==expectedSeparator) {
return expectedPrefix;