diff options
author | Andrey Loskutov | 2016-12-02 10:34:55 +0000 |
---|---|---|
committer | Andrey Loskutov | 2016-12-02 19:56:26 +0000 |
commit | 4b197131612806079b638d3b59ee949694ae452d (patch) | |
tree | 2a441e378a49daf8078bdb819f8f4bb07e691fa6 | |
parent | 8d62d2505bcf8bf41c5676c01e9f02e17d673d25 (diff) | |
download | eclipse.platform.ui-4b197131612806079b638d3b59ee949694ae452d.tar.gz eclipse.platform.ui-4b197131612806079b638d3b59ee949694ae452d.tar.xz eclipse.platform.ui-4b197131612806079b638d3b59ee949694ae452d.zip |
Bug 508591 - StringIndexOutOfBoundsException inI20161202-2000
ProgressManagerUtil.getClippedString
Change-Id: I6f1bec851f772acf1bb2bfc0448220e52f6b8ccb
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r-- | bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManagerUtil.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManagerUtil.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManagerUtil.java index 1ffcd025d86..864db7b4a3a 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManagerUtil.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressManagerUtil.java @@ -327,7 +327,12 @@ public class ProgressManagerUtil { } String s1 = textValue.substring(0, start); - String s2 = textValue.substring(end, length); + String s2; + if (end < length) { + s2 = textValue.substring(end, length); + } else { + s2 = ""; //$NON-NLS-1$ + } s = s1 + ellipsisString + s2; return s; } |