From ac29a3a7c5ee544382272a467edbea19c1acefe8 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 3 Aug 2023 17:06:49 -0400 Subject: [PATCH] Fix UnsupportedOperationException in DetectVMInstallationsJob (#292) - fixes #289 --- .../jdt/internal/launching/DetectVMInstallationsJob.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()));