Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfbecker2009-11-06 04:58:07 +0000
committerfbecker2009-11-06 04:58:07 +0000
commitf419713b5e110fcab4145507ddc1306a614fafec (patch)
tree159774841ff6363b0f61d9ab2353bcf61cfff38d /org.eclipse.mylyn.bugzilla.ui/src
parent24f38ad4ce19f3567fa2d5f57e5a4738d8d808f3 (diff)
downloadorg.eclipse.mylyn.tasks-f419713b5e110fcab4145507ddc1306a614fafec.tar.gz
org.eclipse.mylyn.tasks-f419713b5e110fcab4145507ddc1306a614fafec.tar.xz
org.eclipse.mylyn.tasks-f419713b5e110fcab4145507ddc1306a614fafec.zip
ASSIGNED - bug 267769: StringIndexOutOfBoundsException while opening query dialog
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267769
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui/src')
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
index 897d27b5d..a962f6084 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java
@@ -1458,12 +1458,18 @@ public class BugzillaSearchPage extends AbstractRepositoryQueryPage implements L
startingUrl = startingUrl.substring(startingUrl.indexOf("?") + 1); //$NON-NLS-1$
String[] options = startingUrl.split("&"); //$NON-NLS-1$
for (String option : options) {
- String key = option.substring(0, option.indexOf("=")); //$NON-NLS-1$
- String value = URLDecoder.decode(option.substring(option.indexOf("=") + 1), //$NON-NLS-1$
- getTaskRepository().getCharacterEncoding());
+ String key;
+ int endindex = option.indexOf("=");
+ if (endindex == -1) {
+ key = null;
+ } else {
+ key = option.substring(0, option.indexOf("=")); //$NON-NLS-1$
+ }
if (key == null) {
continue;
}
+ String value = URLDecoder.decode(option.substring(option.indexOf("=") + 1), //$NON-NLS-1$
+ getTaskRepository().getCharacterEncoding());
if (key.equals("short_desc")) { //$NON-NLS-1$
summaryPattern.setText(value);

Back to the top