You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2019/08/01 20:15:46 UTC

[activemq-artemis] branch master updated: NO-JIRA Fix NoProcessFilesBehind build on IBM JDK 8

This is an automated email from the ASF dual-hosted git repository.

clebertsuconic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git


The following commit(s) were added to refs/heads/master by this push:
     new b9d7c76  NO-JIRA Fix NoProcessFilesBehind build on IBM JDK 8
     new b142fa9  This closes #2777
b9d7c76 is described below

commit b9d7c76d88a2017ed4ee3aa7d2ea6e001553a87d
Author: brusdev <br...@gmail.com>
AuthorDate: Thu Aug 1 18:12:33 2019 +0200

    NO-JIRA Fix NoProcessFilesBehind build on IBM JDK 8
    
    Remove sun.management.VMManagement to build NoProcessFilesBehind with
    IBM JDK 8.
---
 .../org/apache/activemq/artemis/tests/util/NoProcessFilesBehind.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/NoProcessFilesBehind.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/NoProcessFilesBehind.java
index 949d678..c9e6dad 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/NoProcessFilesBehind.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/NoProcessFilesBehind.java
@@ -105,7 +105,7 @@ public class NoProcessFilesBehind extends TestWatcher {
       java.lang.management.RuntimeMXBean runtime = java.lang.management.ManagementFactory.getRuntimeMXBean();
       java.lang.reflect.Field jvmField = runtime.getClass().getDeclaredField("jvm");
       jvmField.setAccessible(true);
-      sun.management.VMManagement jvm = (sun.management.VMManagement) jvmField.get(runtime);
+      Object jvm = jvmField.get(runtime);
       java.lang.reflect.Method getProcessIdMethod = jvm.getClass().getDeclaredMethod("getProcessId");
       getProcessIdMethod.setAccessible(true);
       return (Integer) getProcessIdMethod.invoke(jvm);