diff --git a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java index 76883b0db5..7316152dd9 100644 --- a/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java +++ b/org.eclipse.jdt.launching/launching/org/eclipse/jdt/internal/launching/DetectVMInstallationsJob.java @@ -12,6 +12,7 @@ import java.io.File; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -62,7 +63,7 @@ protected IStatus run(IProgressMonitor monitor) { // for MacOS, system installed VMs need a special command to locate if (Platform.OS_MACOSX.equals(Platform.getOS())) { try { - systemVMs = Arrays.asList(MacInstalledJREs.getInstalledJREs(monitor)); + systemVMs = new ArrayList<>(Arrays.asList(MacInstalledJREs.getInstalledJREs(monitor))); systemVMs.removeIf(t -> knownVMs.contains(t.getInstallLocation())); for (VMStandin systemVM : systemVMs) { candidates.removeIf(t -> t.equals(systemVM.getInstallLocation()));