Commit 26d8ad44 authored by agurov's avatar agurov

StringIndexOutOfBoundsException in bugtraq in History View (bug 471473)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=471473

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21499 ee007c2a-0a25-0410-9ab9-bf268980928c
parent e07223f7
......@@ -74,6 +74,7 @@ public class IssueList extends LinkList {
String issueRegex = ".*"; //$NON-NLS-1$
String innerRegExp = null;
String modelMessage = null;
if (model.getLogregex() != null) {
issueRegex = model.getLogregex()[0];
......@@ -82,9 +83,9 @@ public class IssueList extends LinkList {
}
}
else if (model.getMessage() != null) {
String template = model.getMessage();
prefix = getTemplatePrefix(template);
suffix = getTemplateSuffix(template);
modelMessage = model.getMessage();
prefix = this.getTemplatePrefix(modelMessage);
suffix = this.getTemplateSuffix(modelMessage);
if (model.isNumber()) {
issueRegex = "[0-9]+(?:,[0-9]+)*"; //$NON-NLS-1$
innerRegExp = "[0-9]+"; //$NON-NLS-1$
......@@ -116,7 +117,7 @@ public class IssueList extends LinkList {
Matcher entryMatcher = Pattern.compile(innerRegExp).matcher(group);
while (entryMatcher.find()) {
String originalPrefix = model.getMessage() == null ? "" : this.getTemplatePrefix(model.getMessage());
String originalPrefix = modelMessage == null ? "" : this.getTemplatePrefix(modelMessage);
int prefixLength = matcher.start() + originalPrefix.length();
// FIXME generate debug report, since there is an error, check bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=471473
if (prefixLength + entryMatcher.end() > message.length()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment