Bug 553276 - If directory has spaces, then add API baseline doesnt work-
Revert partially "Address SonarQube blockers - URL maps/sets
performance"

Change-Id: I9820e0a66d19bfcbec77af2c897463092593ce36
Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginPathFinder.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginPathFinder.java
index 2da9262..9b52deb 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginPathFinder.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PluginPathFinder.java
@@ -18,12 +18,9 @@
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.net.MalformedURLException;
-import java.net.URI;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Properties;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
@@ -271,7 +268,7 @@
 	 * @return URLs to plugins/features
 	 */
 	public static URL[] scanLocations(File[] sites) {
-		Map<URI, URL> result = new HashMap<>();
+		HashSet<URL> result = new HashSet<>();
 		for (int i = 0; i < sites.length; i++) {
 			if (!sites[i].exists()) {
 				continue;
@@ -280,14 +277,13 @@
 			if (children != null) {
 				for (File element : children) {
 					try {
-						URI elementUri = element.toURI();
-						result.put(elementUri, elementUri.toURL());
+						result.add(element.toURL());
 					} catch (MalformedURLException e) {
 					}
 				}
 			}
 		}
-		return result.values().toArray(new URL[result.size()]);
+		return result.toArray(new URL[result.size()]);
 	}
 
 	public static boolean isDevLaunchMode() {