From 4fd4608546a5276d0e15042faa8b7ec2bde8d686 Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Fri, 5 Jul 2019 08:44:17 +0200 Subject: Using indexOf char instead of indexOf String See https://sourceforge.net/p/findbugs/feature-requests/300/#cb7f for a performance related discussion --- .../osgi/internal/debug/FrameworkDebugOptions.java | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java index c2d7209e3..6f7db2570 100644 --- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java +++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/debug/FrameworkDebugOptions.java @@ -13,13 +13,25 @@ *******************************************************************************/ package org.eclipse.osgi.internal.debug; -import java.io.*; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; import java.net.URL; -import java.util.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Properties; +import java.util.Set; import org.eclipse.osgi.internal.framework.EquinoxConfiguration; import org.eclipse.osgi.internal.location.LocationHelper; -import org.eclipse.osgi.service.debug.*; -import org.osgi.framework.*; +import org.eclipse.osgi.service.debug.DebugOptions; +import org.eclipse.osgi.service.debug.DebugOptionsListener; +import org.eclipse.osgi.service.debug.DebugTrace; +import org.osgi.framework.BundleContext; +import org.osgi.framework.InvalidSyntaxException; +import org.osgi.framework.ServiceReference; import org.osgi.util.tracker.ServiceTracker; import org.osgi.util.tracker.ServiceTrackerCustomizer; @@ -256,7 +268,7 @@ public class FrameworkDebugOptions implements DebugOptions, ServiceTrackerCustom } private String getSymbolicName(String option) { - int firstSlashIndex = option.indexOf("/"); //$NON-NLS-1$ + int firstSlashIndex = option.indexOf('/'); if (firstSlashIndex > 0) return option.substring(0, firstSlashIndex); return null; -- cgit v1.2.3