jdk/src/java.management/share/classes/com/sun/jmx/mbeanserver/JmxMBeanServer.java
changeset 43235 da1786d695b6
parent 28059 e576535359cc
equal deleted inserted replaced
43234:cb2a6851b837 43235:da1786d695b6
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    34 import java.security.Permission;
    34 import java.security.Permission;
    35 import java.security.PrivilegedAction;
    35 import java.security.PrivilegedAction;
    36 import java.security.PrivilegedExceptionAction;
    36 import java.security.PrivilegedExceptionAction;
    37 import java.util.List;
    37 import java.util.List;
    38 import java.util.Set;
    38 import java.util.Set;
    39 import java.util.logging.Level;
    39 import java.lang.System.Logger.Level;
    40 
    40 
    41 import javax.management.Attribute;
    41 import javax.management.Attribute;
    42 import javax.management.AttributeList;
    42 import javax.management.AttributeList;
    43 import javax.management.AttributeNotFoundException;
    43 import javax.management.AttributeNotFoundException;
    44 import javax.management.InstanceAlreadyExistsException;
    44 import javax.management.InstanceAlreadyExistsException;
  1227                             MBeanServerDelegate.DELEGATE_NAME);
  1227                             MBeanServerDelegate.DELEGATE_NAME);
  1228                     return null;
  1228                     return null;
  1229                 }
  1229                 }
  1230             });
  1230             });
  1231         } catch (SecurityException e) {
  1231         } catch (SecurityException e) {
  1232             if (MBEANSERVER_LOGGER.isLoggable(Level.FINEST)) {
  1232             if (MBEANSERVER_LOGGER.isLoggable(Level.DEBUG)) {
  1233                 MBEANSERVER_LOGGER.logp(Level.FINEST,
  1233                 MBEANSERVER_LOGGER.log(Level.DEBUG,
  1234                         JmxMBeanServer.class.getName(), "initialize",
       
  1235                         "Unexpected security exception occurred", e);
  1234                         "Unexpected security exception occurred", e);
  1236             }
  1235             }
  1237             throw e;
  1236             throw e;
  1238         } catch (Exception e) {
  1237         } catch (Exception e) {
  1239             if (MBEANSERVER_LOGGER.isLoggable(Level.FINEST)) {
  1238             if (MBEANSERVER_LOGGER.isLoggable(Level.DEBUG)) {
  1240                 MBEANSERVER_LOGGER.logp(Level.FINEST,
  1239                 MBEANSERVER_LOGGER.log(Level.DEBUG,
  1241                         JmxMBeanServer.class.getName(), "initialize",
       
  1242                         "Unexpected exception occurred", e);
  1240                         "Unexpected exception occurred", e);
  1243             }
  1241             }
  1244             throw new
  1242             throw new
  1245                 IllegalStateException("Can't register delegate.",e);
  1243                 IllegalStateException("Can't register delegate.",e);
  1246         }
  1244         }