Skip to content

Commit

Permalink
7378: Update platform to 2021-06
Browse files Browse the repository at this point in the history
Reviewed-by: ghb
  • Loading branch information
thegreystone committed Sep 9, 2021
1 parent 341f3d5 commit d05f377
Show file tree
Hide file tree
Showing 32 changed files with 126 additions and 244 deletions.
4 changes: 1 addition & 3 deletions application/org.openjdk.jmc.attach/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ Bundle-Name: Attach Plug-in
Bundle-SymbolicName: org.openjdk.jmc.attach;singleton:=true
Bundle-Version: 8.2.0.qualifier
Bundle-Vendor: Oracle Corporation
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Classpath: .,
external:$java.home$/../lib/tools.jar
Bundle-RequiredExecutionEnvironment: JavaSE-11
Eclipse-BuddyPolicy: app
Export-Package: org.openjdk.jmc.attach,
com.sun.tools.attach,
Expand Down
18 changes: 7 additions & 11 deletions application/org.openjdk.jmc.attach/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
<packaging>eclipse-plugin</packaging>

<properties>
<java.source>11</java.source>
<java.target>11</java.target>
<project.build.java.target>11</project.build.java.target>
<spotless.config.path>${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
</properties>

Expand All @@ -52,20 +55,13 @@
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<!-- Disable error for forbidden access to sun.management.* APIs -->
<compilerArgument>-err:-forbidden</compilerArgument>
<compilerArgs>
<args>--add-exports</args>
<args>java.management/sun.management=ALL-UNNAMED</args>
</compilerArgs>
<excludes>
<exclude>**/Empty.java</exclude>
</excludes>
<extraClasspathElements>
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>1.8.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</extraClasspathElements>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
Expand Down Expand Up @@ -36,8 +36,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import sun.management.counter.perf.InstrumentationException;

/**
* Checks for local attach availability
*/
Expand Down Expand Up @@ -88,8 +86,6 @@ public static String importFromPid(Integer pid) {
return (String) importFrom.invoke(null, pid);
} catch (NullPointerException e) {
// This can happen if the JVM dies on us during the call.
} catch (InstrumentationException e) {
// This can happen when connecting to a 1.4 Sun JVM.
} catch (Throwable t) {
LOGGER.log(Level.WARNING, "Could not get connector address for pid", t); //$NON-NLS-1$
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Name: Browser Attach Plug-in
Bundle-SymbolicName: org.openjdk.jmc.browser.attach;singleton:=true
Bundle-Version: 8.2.0.qualifier
Expand Down
19 changes: 9 additions & 10 deletions application/org.openjdk.jmc.browser.attach/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
Expand Down Expand Up @@ -52,15 +52,14 @@
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<extraClasspathElements>
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>1.8.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</extraClasspathElements>
<compilerArgs>
<args>--add-exports</args>
<args>jdk.attach/sun.tools.attach=ALL-UNNAMED</args>
<args>--add-exports</args>
<args>jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</args>
<args>--add-exports</args>
<args>java.management/sun.management.counter.perf=ALL-UNNAMED</args>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import java.util.Properties;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
Expand Down Expand Up @@ -109,7 +110,7 @@ public IServerDescriptor getServerDescriptor() {
private static long SEQ_NUMBER = 0;
private static boolean isErrorMessageSent = false;
private static boolean m_unconnectableInited = false;
private static boolean m_showUnconnectable = false;
private static AtomicBoolean m_showUnconnectable = new AtomicBoolean();

private static Map<Object, DiscoveryEntry> last = new WeakHashMap<>();

Expand Down Expand Up @@ -140,19 +141,19 @@ private static final boolean showUnconnectableJvms() {
if (!m_unconnectableInited) {
IPreferenceStore store = BrowserAttachPlugin.getDefault().getPreferenceStore();
if (store != null) {
m_showUnconnectable = store.getBoolean(PreferenceConstants.P_SHOW_UNCONNECTABLE);
m_showUnconnectable.set(store.getBoolean(PreferenceConstants.P_SHOW_UNCONNECTABLE));
store.addPropertyChangeListener(new IPropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent event) {
if (event.getProperty().equals(PreferenceConstants.P_SHOW_UNCONNECTABLE)) {
m_showUnconnectable = ((Boolean) event.getNewValue()).booleanValue();
m_showUnconnectable.set(((Boolean) event.getNewValue()).booleanValue());
}
}
});
m_unconnectableInited = true;
}
}
return m_showUnconnectable;
return m_showUnconnectable.get();
}

private static void populateMonitoredVMs(HashMap<Object, DiscoveryEntry> map, boolean includeUnconnectables) {
Expand Down
2 changes: 1 addition & 1 deletion application/org.openjdk.jmc.browser/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Require-Bundle: org.openjdk.jmc.ui,
Eclipse-BuddyPolicy: app
Bundle-Vendor: Oracle Corporation
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Export-Package: org.openjdk.jmc.browser.views;x-friends:="org.openjdk.jmc.test.jemmy",
org.openjdk.jmc.browser.wizards;x-friends:="org.openjdk.jmc.test.jemmy"
Expand Down
15 changes: 6 additions & 9 deletions application/org.openjdk.jmc.browser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,12 @@
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<extraClasspathElements>
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>1.8.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</extraClasspathElements>
<compilerArgs>
<args>--add-exports</args>
<args>jdk.attach/sun.tools.attach=ALL-UNNAMED</args>
<args>--add-exports</args>
<args>jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED</args>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.openjdk.jmc.console.ui,
org.openjdk.jmc.flightrecorder.ui,
org.openjdk.jmc.rjmx
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: javax.inject,
org.eclipse.debug.core.sourcelookup.containers
Bundle-ActivationPolicy: lazy
Expand Down
18 changes: 7 additions & 11 deletions application/org.openjdk.jmc.console.agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@
<packaging>eclipse-plugin</packaging>

<properties>
<java.source>11</java.source>
<java.target>11</java.target>
<project.build.java.target>11</project.build.java.target>
<jmc.agent.version>1.0.0-SNAPSHOT</jmc.agent.version>
<java.version>1.8</java.version>

<spotless.config.path>${basedir}/../../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
</properties>

Expand All @@ -60,15 +61,10 @@
<artifactId>tycho-compiler-plugin</artifactId>
<version>${tycho.version}</version>
<configuration>
<extraClasspathElements>
<dependency>
<groupId>sun.jdk</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</extraClasspathElements>
<compilerArgs>
<args>--add-exports</args>
<args>java.management/sun.management=ALL-UNNAMED</args>
</compilerArgs>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Require-Bundle: org.eclipse.ui,
Bundle-ActivationPolicy: lazy
Export-Package: org.openjdk.jmc.console.jconsole,
com.sun.tools.jconsole
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .,
external:$java.home$/../lib/jconsole.jar
Eclipse-BuddyPolicy: app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
Expand All @@ -60,7 +59,6 @@
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.forms.widgets.FormToolkit;

import org.openjdk.jmc.console.ui.actions.MBeanAutomaticRefreshAction;
import org.openjdk.jmc.console.ui.mbeanbrowser.MBeanBrowserPlugin;
import org.openjdk.jmc.console.ui.mbeanbrowser.messages.internal.Messages;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
Expand Down
2 changes: 0 additions & 2 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
<packaging>pom</packaging>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<spotless.config.path>${basedir}/../configuration/ide/eclipse/formatting/formatting.xml</spotless.config.path>
<jfr.tests/>
<jfr.vmargs>-XX:+FlightRecorder</jfr.vmargs>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/test-classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: Flightrecorder Plug-in Test
Bundle-SymbolicName: org.openjdk.jmc.flightrecorder.ui.test;singleton:=true
Bundle-Version: 8.2.0.qualifier
Bundle-Vendor: Oracle Corporation
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Require-Bundle: org.junit,
org.openjdk.jmc.flightrecorder.ui,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.openjdk.jmc.rjmx,
org.junit
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Import-Package: org.openjdk.jmc.test.jemmy,
org.openjdk.jmc.test.jemmy.misc.base.test,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: Uitest
Bundle-SymbolicName: org.openjdk.jmc.console.jconsole.uitest;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Oracle Corporation
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Require-Bundle: org.openjdk.jmc.test.jemmy,
org.junit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Bundle-Vendor: Oracle Corporation
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Import-Package: org.openjdk.jmc.test.jemmy,
org.openjdk.jmc.test.jemmy.misc.base.test,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Require-Bundle: org.eclipse.ui,
org.openjdk.jmc.rjmx.ui,
org.openjdk.jmc.console.ui.mbeanbrowser,
org.junit
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Import-Package: org.openjdk.jmc.common.util,
org.openjdk.jmc.console.ui.diagnostic.form,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/test-classes"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.openjdk.jmc.flightrecorder.controlpanel.ui,
org.junit
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Import-Package: org.eclipse.core.resources,
org.openjdk.jmc.flightrecorder.internal,
org.openjdk.jmc.flightrecorder.jdk,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Bundle-Name: Uitest
Bundle-SymbolicName: org.openjdk.jmc.rcp.application.uitest;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: Oracle Corporation
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Require-Bundle: org.junit,
org.openjdk.jmc.test.jemmy
Expand Down
33 changes: 33 additions & 0 deletions core/org.openjdk.jmc.flightrecorder.writer/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/classes" path="${rootDir}/license">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Loading

0 comments on commit d05f377

Please sign in to comment.