Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
package com.microsoft.java.debug.plugin.internal;

import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -177,7 +179,7 @@ private static String[][] computeClassPath(IJavaProject javaProject) throws Core

private static String[] computeDefaultRuntimeClassPath(IJavaProject jproject) throws CoreException {
IRuntimeClasspathEntry[] unresolved = JavaRuntime.computeUnresolvedRuntimeClasspath(jproject);
List<String> resolved = new ArrayList<>(unresolved.length);
Set<String> resolved = new LinkedHashSet<String>();
for (int i = 0; i < unresolved.length; i++) {
IRuntimeClasspathEntry entry = unresolved[i];
if (entry.getClasspathProperty() == IRuntimeClasspathEntry.USER_CLASSES) {
Expand All @@ -189,6 +191,7 @@ private static String[] computeDefaultRuntimeClassPath(IJavaProject jproject) th
}
String location = entries[j].getLocation();
if (location != null) {
// remove duplicate classpath
resolved.add(location);
}
}
Expand Down