Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2021-03-19 09:20:19 +0000
committerAlexander Kurtakov2021-03-23 19:52:04 +0000
commit30f852b04b093b9448e0a3736185c064a5b14d16 (patch)
tree5f90d2e3529070c06d9ba1ef6eabcd818dd66f8f
parent37d8b0cc3643d1d87eaa87b2b8b4e275ba168c69 (diff)
downloadeclipse.platform.ua-30f852b04b093b9448e0a3736185c064a5b14d16.tar.gz
eclipse.platform.ua-30f852b04b093b9448e0a3736185c064a5b14d16.tar.xz
eclipse.platform.ua-30f852b04b093b9448e0a3736185c064a5b14d16.zip
[Cleanup] Redundant substring() operation in ui.cheatsheetsI20210324-0320
Removes the second substring() parameter if this parameter is the length of the string. It's the default value. Found during testing of Bug 569800 (new JDT cleanup for this case). Change-Id: If8cf310612b21cf3840b35416cc86a3a519da395 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
index acbc55503..57eef579f 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/data/CheatSheetParser.java
@@ -521,7 +521,7 @@ public class CheatSheetParser implements IStatusContainer {
firstNonWhitespaceIndex++;
}
if (firstNonWhitespaceIndex > 0) {
- return nodeValue.substring(firstNonWhitespaceIndex, nodeValue.length());
+ return nodeValue.substring(firstNonWhitespaceIndex);
}
return nodeValue;
}

Back to the top