File tree 1 file changed +10
-6
lines changed
src/main/java/org/jboss/threads
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -1861,13 +1861,17 @@ void completeTermination() {
1861
1861
waiters = waiters .getNext ();
1862
1862
}
1863
1863
tail .setNext (TERMINATE_COMPLETE );
1864
- if (this .acc != null ) {
1865
- final Object handle = this .handle ;
1866
- if (handle != null ) {
1867
- intr = intr || Thread .interrupted ();
1868
- doPrivileged (new MBeanUnregisterAction (handle ), acc );
1864
+ if (!DISABLE_MBEAN ) {
1865
+ //The check for DISABLE_MBEAN is redundant as acc would be null,
1866
+ //but GraalVM needs the hint so to not make JMX reachable.
1867
+ if (this .acc != null ) {
1868
+ final Object handle = this .handle ;
1869
+ if (handle != null ) {
1870
+ intr = intr || Thread .interrupted ();
1871
+ doPrivileged (new MBeanUnregisterAction (handle ), acc );
1872
+ }
1873
+ this .acc = null ;
1869
1874
}
1870
- this .acc = null ;
1871
1875
}
1872
1876
} finally {
1873
1877
if (intr ) {
You can’t perform that action at this time.
0 commit comments