From c7825dc246d94ce1a3b47d46c8d1302b927df027 Mon Sep 17 00:00:00 2001 From: linghengqian Date: Sat, 21 Jan 2023 23:03:00 +0800 Subject: [PATCH] Point out that PR needs to remove GraalVM reachability metadata related to MBeans --- CONTRIBUTING.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6e7dc54fc..204212df9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -122,6 +122,22 @@ output if necessary: ./gradlew check ``` +All submitted GraalVM reachability metadata, if the MBean-related part is unnecessary, should actively remove the +GraalVM reachability metadata related to the MBean. These metadata can cause calls to +`ManagementFactory.getPlatformMBeanServer()` to fail with `javax.management.openmbean.OpenDataException`. In most cases, +it would appear that the metadata is sufficient for the bootstrapping of the MBean server to take a different code path +to normal and this path fails. There are reference operations in some PRs, such +as https://github.com/oracle/graalvm-reachability-metadata/pull/113, https://github.com/oracle/graalvm-reachability-metadata/pull/161, +https://github.com/oracle/graalvm-reachability-metadata/pull/162. This includes the following five packages. + +``` +java.lang.management.** +jdk.management.** +com.sun.management.** +sun.management.** +javax.management.** +``` + ### Tests Every submitted library must feature tests that serve as a safeguard against regressions.