From f1924473cb1bcda4b7d0f6e5cfd5061493d0f951 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Thu, 7 Mar 2013 14:05:05 +0100 Subject: [PATCH] 8008603: Improve provision of JMX providers Reviewed-by: alanb, dfuchs, jfdenise, skoivu --- .../javax/management/remote/JMXConnectorFactory.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/jdk/src/share/classes/javax/management/remote/JMXConnectorFactory.java b/jdk/src/share/classes/javax/management/remote/JMXConnectorFactory.java index 3cea5d44879..4f6533a49af 100644 --- a/jdk/src/share/classes/javax/management/remote/JMXConnectorFactory.java +++ b/jdk/src/share/classes/javax/management/remote/JMXConnectorFactory.java @@ -542,14 +542,9 @@ public class JMXConnectorFactory { } } - if (loader == null) - loader = AccessController.doPrivileged( - new PrivilegedAction() { - public ClassLoader run() { - return - Thread.currentThread().getContextClassLoader(); - } - }); + if (loader == null) { + loader = Thread.currentThread().getContextClassLoader(); + } return loader; }