From 39ddd1339e8fb4f231e80c137d0112415f22298a Mon Sep 17 00:00:00 2001 From: Aymane Harmaz Date: Thu, 4 Dec 2025 16:16:58 +0000 Subject: [PATCH 1/2] 8473: JMC silently connects to its own runtime if target runtime does not include management modules Reviewed-by: hirt --- .../browser/attach/LocalConnectionDescriptor.java | 4 ++-- .../jmc/browser/attach/LocalJVMToolkit.java | 2 +- .../console/agent/actions/AgentEditorOpener.java | 15 ++++++--------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalConnectionDescriptor.java b/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalConnectionDescriptor.java index 19a0e4626..1fa45b708 100644 --- a/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalConnectionDescriptor.java +++ b/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalConnectionDescriptor.java @@ -150,7 +150,7 @@ public Void call() throws Exception { } private void setAddress(String address) { - if (isSelfMonitoring() || address == null) { + if (isSelfMonitoring()) { // If we're attempting to monitor ourselves, use the local // JVM (since the poor agent currently may go into infinite // recursion otherwise). @@ -160,7 +160,7 @@ private void setAddress(String address) { // Not going to happen... LOGGER.log(Level.SEVERE, "Failed to parse url", e); } - } else { + } else if (address != null) { try { url = new JMXServiceURL(address); } catch (MalformedURLException e) { diff --git a/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalJVMToolkit.java b/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalJVMToolkit.java index 652c9f927..c21a8b23a 100644 --- a/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalJVMToolkit.java +++ b/application/org.openjdk.jmc.browser.attach/src/main/java/org/openjdk/jmc/browser/attach/LocalJVMToolkit.java @@ -527,7 +527,7 @@ public static synchronized DiscoveryEntry[] getAttachableJVMs() { */ public static String executeCommandForPid(String pid, String command) throws AttachNotSupportedException, IOException, AgentLoadException { - return executeCommandForPid(pid, command, false); + return executeCommandForPid(pid, command, true); } /** diff --git a/application/org.openjdk.jmc.console.agent/src/main/java/org/openjdk/jmc/console/agent/actions/AgentEditorOpener.java b/application/org.openjdk.jmc.console.agent/src/main/java/org/openjdk/jmc/console/agent/actions/AgentEditorOpener.java index 052e81a1d..7fc324777 100644 --- a/application/org.openjdk.jmc.console.agent/src/main/java/org/openjdk/jmc/console/agent/actions/AgentEditorOpener.java +++ b/application/org.openjdk.jmc.console.agent/src/main/java/org/openjdk/jmc/console/agent/actions/AgentEditorOpener.java @@ -41,7 +41,6 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.wizard.WizardDialog; -import org.eclipse.osgi.util.NLS; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; @@ -52,7 +51,6 @@ import org.openjdk.jmc.common.action.Executable; import org.openjdk.jmc.common.io.IOToolkit; import org.openjdk.jmc.console.agent.AgentJmxHelper; -import org.openjdk.jmc.console.agent.AgentPlugin; import org.openjdk.jmc.console.agent.editor.AgentEditor; import org.openjdk.jmc.console.agent.editor.AgentEditorInput; import org.openjdk.jmc.console.agent.messages.internal.Messages; @@ -97,13 +95,12 @@ protected IStatus run(IProgressMonitor monitor) { helper.removeConnectionChangedListener(this); return ret; } catch (ConnectionException e) { - IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - DialogToolkit.showException(window.getShell(), Messages.AgentEditorOpener_MESSAGE_COULD_NOT_CONNECT, e); - - return new Status(IStatus.ERROR, AgentPlugin.PLUGIN_ID, IStatus.ERROR, - NLS.bind(Messages.AgentEditorOpener_MESSAGE_COULD_NOT_CONNECT, - serverHandle.getServerDescriptor().getDisplayName(), e.getMessage()), - e); + DisplayToolkit.safeAsyncExec(Display.getDefault(), () -> { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + DialogToolkit.showException(window.getShell(), Messages.AgentEditorOpener_MESSAGE_COULD_NOT_CONNECT, + e); + }); + return Status.CANCEL_STATUS; } } From 103487344f7d6dc94a8064b12b2b604103029770 Mon Sep 17 00:00:00 2001 From: viragpurnam123 Date: Mon, 8 Dec 2025 15:54:01 +0000 Subject: [PATCH 2/2] 8474: Eclipse platform upgrade to 2025_09 Reviewed-by: hirt --- pom.xml | 37 ++----- .../platform-definition-2024-06.target | 99 ------------------- .../platform-definition-2024-09/pom.xml | 47 --------- .../platform-definition-2024-12.target | 18 ++-- .../platform-definition-2025-03.target | 18 ++-- .../platform-definition-2025-06.target | 18 ++-- .../platform-definition-2025-09.target} | 55 +++++------ .../pom.xml | 6 +- releng/platform-definitions/pom.xml | 3 +- releng/third-party/pom.xml | 2 +- 10 files changed, 67 insertions(+), 236 deletions(-) delete mode 100644 releng/platform-definitions/platform-definition-2024-06/platform-definition-2024-06.target delete mode 100644 releng/platform-definitions/platform-definition-2024-09/pom.xml rename releng/platform-definitions/{platform-definition-2024-09/platform-definition-2024-09.target => platform-definition-2025-09/platform-definition-2025-09.target} (84%) rename releng/platform-definitions/{platform-definition-2024-06 => platform-definition-2025-09}/pom.xml (92%) diff --git a/pom.xml b/pom.xml index b5287f72d..47a57c7be 100644 --- a/pom.xml +++ b/pom.xml @@ -125,7 +125,7 @@ - 2025-06 + 2025-09 true @@ -139,7 +139,7 @@ org.openjdk.jmc - platform-definition-2025-06 + platform-definition-2025-09 ${revision}${changelist} @@ -149,28 +149,7 @@ - 2025-03 - - - - org.eclipse.tycho - target-platform-configuration - ${tycho.version} - - - - org.openjdk.jmc - platform-definition-2025-03 - ${revision}${changelist} - - - - - - - - - 2024-12 + 2025-06 @@ -181,7 +160,7 @@ org.openjdk.jmc - platform-definition-2024-12 + platform-definition-2025-06 ${revision}${changelist} @@ -191,7 +170,7 @@ - 2024-09 + 2025-03 @@ -202,7 +181,7 @@ org.openjdk.jmc - platform-definition-2024-09 + platform-definition-2025-03 ${revision}${changelist} @@ -212,7 +191,7 @@ - 2024-06 + 2024-12 @@ -223,7 +202,7 @@ org.openjdk.jmc - platform-definition-2024-06 + platform-definition-2024-12 ${revision}${changelist} diff --git a/releng/platform-definitions/platform-definition-2024-06/platform-definition-2024-06.target b/releng/platform-definitions/platform-definition-2024-06/platform-definition-2024-06.target deleted file mode 100644 index b54e92913..000000000 --- a/releng/platform-definitions/platform-definition-2024-06/platform-definition-2024-06.target +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/releng/platform-definitions/platform-definition-2024-09/pom.xml b/releng/platform-definitions/platform-definition-2024-09/pom.xml deleted file mode 100644 index 30fceb956..000000000 --- a/releng/platform-definitions/platform-definition-2024-09/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - 4.0.0 - - org.openjdk.jmc - platform-definitions - ${revision}${changelist} - - platform-definition-2024-09 - eclipse-target-definition - - ${project.basedir}/../../../configuration - - diff --git a/releng/platform-definitions/platform-definition-2024-12/platform-definition-2024-12.target b/releng/platform-definitions/platform-definition-2024-12/platform-definition-2024-12.target index 292202fae..a5d2cd883 100644 --- a/releng/platform-definitions/platform-definition-2024-12/platform-definition-2024-12.target +++ b/releng/platform-definitions/platform-definition-2024-12/platform-definition-2024-12.target @@ -49,15 +49,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/releng/platform-definitions/platform-definition-2025-03/platform-definition-2025-03.target b/releng/platform-definitions/platform-definition-2025-03/platform-definition-2025-03.target index 9e2137a3b..2f19bc93e 100644 --- a/releng/platform-definitions/platform-definition-2025-03/platform-definition-2025-03.target +++ b/releng/platform-definitions/platform-definition-2025-03/platform-definition-2025-03.target @@ -49,15 +49,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/releng/platform-definitions/platform-definition-2025-06/platform-definition-2025-06.target b/releng/platform-definitions/platform-definition-2025-06/platform-definition-2025-06.target index 758fad7fc..36b291839 100644 --- a/releng/platform-definitions/platform-definition-2025-06/platform-definition-2025-06.target +++ b/releng/platform-definitions/platform-definition-2025-06/platform-definition-2025-06.target @@ -49,15 +49,15 @@ - - - - - - - - - + + + + + + + + + diff --git a/releng/platform-definitions/platform-definition-2024-09/platform-definition-2024-09.target b/releng/platform-definitions/platform-definition-2025-09/platform-definition-2025-09.target similarity index 84% rename from releng/platform-definitions/platform-definition-2024-09/platform-definition-2024-09.target rename to releng/platform-definitions/platform-definition-2025-09/platform-definition-2025-09.target index 4e8114699..69de27b73 100644 --- a/releng/platform-definitions/platform-definition-2024-09/platform-definition-2024-09.target +++ b/releng/platform-definitions/platform-definition-2025-09/platform-definition-2025-09.target @@ -1,7 +1,6 @@ - + @@ -49,15 +48,15 @@ - - - - - - - - - + + + + + + + + + @@ -69,24 +68,24 @@ - - + + - - - - - + + + + + - - - - - - - - - + + + + + + + + + diff --git a/releng/platform-definitions/platform-definition-2024-06/pom.xml b/releng/platform-definitions/platform-definition-2025-09/pom.xml similarity index 92% rename from releng/platform-definitions/platform-definition-2024-06/pom.xml rename to releng/platform-definitions/platform-definition-2025-09/pom.xml index fd7fe4702..3f4ff54c0 100644 --- a/releng/platform-definitions/platform-definition-2024-06/pom.xml +++ b/releng/platform-definitions/platform-definition-2025-09/pom.xml @@ -1,7 +1,7 @@