Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-07-05 07:27:02 +0000
committerLars Vogel2019-07-05 08:58:52 +0000
commitf2344b3db3239bb775f2c0afda9585a3225e17d1 (patch)
treec530896f115e225242f6fcfad41b2eb64937a1fa /examples/org.eclipse.swt.snippets/src/org
parentfc9b884466b4cea64613988d1bbd2425e18472ae (diff)
downloadeclipse.platform.swt-f2344b3db3239bb775f2c0afda9585a3225e17d1.tar.gz
eclipse.platform.swt-f2344b3db3239bb775f2c0afda9585a3225e17d1.tar.xz
eclipse.platform.swt-f2344b3db3239bb775f2c0afda9585a3225e17d1.zip
Using indexOf char instead of indexOf String
See https://sourceforge.net/p/findbugs/feature-requests/300/#cb7f for a performance related discussion Change-Id: I255d2fa2b525281d9a6724aadbf85828236dbb30 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'examples/org.eclipse.swt.snippets/src/org')
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java
index 59f527789c..6f14f3ecba 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet80.java
@@ -54,7 +54,7 @@ public static void main(String[] args) {
TreeItem[] revisedSelection = new TreeItem[0];
for (int i = 0; i < selection.length; i++) {
String text = selection[i].getText();
- if (text.indexOf("1") > 0) {
+ if (text.indexOf('1') > 0) {
TreeItem[] newSelection = new TreeItem[revisedSelection.length + 1];
System.arraycopy(revisedSelection, 0, newSelection, 0, revisedSelection.length);
newSelection[revisedSelection.length] = selection[i];

Back to the top