From 9e7c3bcdba010a8a46d9a51d221e02222a6efc89 Mon Sep 17 00:00:00 2001 From: bstarynk Date: Fri, 14 Jan 2011 10:15:29 +0000 Subject: 2011-01-14 Basile Starynkevitch MELT branch merged with trunk rev 168776 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@168777 138bc75d-0d04-0410-961f-82ee72b054a4 --- .../javax/management/MBeanServerFactory.java | 110 ++++++++++----------- 1 file changed, 55 insertions(+), 55 deletions(-) (limited to 'libjava/classpath/javax/management/MBeanServerFactory.java') diff --git a/libjava/classpath/javax/management/MBeanServerFactory.java b/libjava/classpath/javax/management/MBeanServerFactory.java index d798b0c4517..f9bd4566f37 100644 --- a/libjava/classpath/javax/management/MBeanServerFactory.java +++ b/libjava/classpath/javax/management/MBeanServerFactory.java @@ -134,7 +134,7 @@ public class MBeanServerFactory * The default domain name is used when the domain name specified by * the user is nullserver is null. @@ -246,7 +246,7 @@ public class MBeanServerFactory * used when the domain name specified by the user is nullnull value. * @@ -331,42 +331,42 @@ public class MBeanServerFactory SystemProperties.getProperty("javax.management.builder.initial"); if (builderClass == null) { - if (builder == null || - builder.getClass() != MBeanServerBuilder.class) - builder = new MBeanServerBuilder(); + if (builder == null || + builder.getClass() != MBeanServerBuilder.class) + builder = new MBeanServerBuilder(); } else if (!(builder != null && - builderClass.equals(builder.getClass().getName()))) + builderClass.equals(builder.getClass().getName()))) { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - if (cl == null) - cl = MBeanServerFactory.class.getClassLoader(); - try - { - Class bClass = Class.forName(builderClass, true, cl); - builder = (MBeanServerBuilder) bClass.newInstance(); - } - catch (ClassNotFoundException e) - { - throw (JMRuntimeException) (new JMRuntimeException("The builder class, " - + builderClass + - ", could not be found.")) - .initCause(e); - } - catch (InstantiationException e) - { - throw (JMRuntimeException) (new JMRuntimeException("The builder class, " - + builderClass + - ", could not be instantiated.")) - .initCause(e); - } - catch (IllegalAccessException e) - { - throw (JMRuntimeException) (new JMRuntimeException("The builder class, " - + builderClass + - ", could not be accessed.")) - .initCause(e); - } + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + if (cl == null) + cl = MBeanServerFactory.class.getClassLoader(); + try + { + Class bClass = Class.forName(builderClass, true, cl); + builder = (MBeanServerBuilder) bClass.newInstance(); + } + catch (ClassNotFoundException e) + { + throw (JMRuntimeException) (new JMRuntimeException("The builder class, " + + builderClass + + ", could not be found.")) + .initCause(e); + } + catch (InstantiationException e) + { + throw (JMRuntimeException) (new JMRuntimeException("The builder class, " + + builderClass + + ", could not be instantiated.")) + .initCause(e); + } + catch (IllegalAccessException e) + { + throw (JMRuntimeException) (new JMRuntimeException("The builder class, " + + builderClass + + ", could not be accessed.")) + .initCause(e); + } } MBeanServerDelegate delegate = builder.newMBeanServerDelegate(); if (delegate == null) @@ -399,12 +399,12 @@ public class MBeanServerFactory Iterator i = servers.values().iterator(); while (i.hasNext()) { - MBeanServer s = i.next(); - if (server == s) - { - i.remove(); - return; - } + MBeanServer s = i.next(); + if (server == s) + { + i.remove(); + return; + } } throw new IllegalArgumentException("The server given is not referenced."); } -- cgit v1.2.1