jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java
changeset 43235 da1786d695b6
parent 25859 3317bb8137f4
child 44858 7183899b064b
--- a/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java	Fri Jan 20 07:05:40 2017 -0800
+++ b/jdk/src/java.management/share/classes/javax/management/modelmbean/ModelMBeanNotificationInfo.java	Fri Jan 20 18:41:12 2017 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
 import java.io.ObjectOutputStream;
 import java.io.ObjectStreamField;
 import java.security.AccessController;
-import java.util.logging.Level;
+import java.lang.System.Logger.Level;
 
 import javax.management.Descriptor;
 import javax.management.DescriptorAccess;
@@ -199,10 +199,8 @@
                                       String description,
                                       Descriptor descriptor) {
         super(notifTypes, name, description);
-        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
-            MODELMBEAN_LOGGER.logp(Level.FINER,
-                    ModelMBeanNotificationInfo.class.getName(),
-                    "ModelMBeanNotificationInfo", "Entry");
+        if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
         }
         notificationDescriptor = validDescriptor(descriptor);
     }
@@ -225,10 +223,8 @@
      * duplicate of this ModelMBeanNotificationInfo.
      **/
     public Object clone () {
-        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
-            MODELMBEAN_LOGGER.logp(Level.FINER,
-                    ModelMBeanNotificationInfo.class.getName(),
-                    "clone()", "Entry");
+        if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
         }
         return(new ModelMBeanNotificationInfo(this));
     }
@@ -243,18 +239,15 @@
      * @see #setDescriptor
      **/
     public Descriptor getDescriptor() {
-        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
-            MODELMBEAN_LOGGER.logp(Level.FINER,
-                    ModelMBeanNotificationInfo.class.getName(),
-                    "getDescriptor()", "Entry");
+        if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
         }
 
         if (notificationDescriptor == null) {
             // Dead code. Should never happen.
-            if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
-                MODELMBEAN_LOGGER.logp(Level.FINER,
-                        ModelMBeanNotificationInfo.class.getName(),
-                        "getDescriptor()", "Descriptor value is null, " +
+            if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
+                MODELMBEAN_LOGGER.log(Level.TRACE,
+                        "Descriptor value is null, " +
                         "setting descriptor to default values");
             }
             notificationDescriptor = validDescriptor(null);
@@ -281,10 +274,8 @@
      * @see #getDescriptor
      **/
     public void setDescriptor(Descriptor inDescriptor) {
-        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
-            MODELMBEAN_LOGGER.logp(Level.FINER,
-                    ModelMBeanNotificationInfo.class.getName(),
-                    "setDescriptor(Descriptor)", "Entry");
+        if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
         }
         notificationDescriptor = validDescriptor(inDescriptor);
     }
@@ -296,10 +287,8 @@
      * @return a string describing this object.
      **/
     public String toString() {
-        if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
-            MODELMBEAN_LOGGER.logp(Level.FINER,
-                    ModelMBeanNotificationInfo.class.getName(),
-                    "toString()", "Entry");
+        if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
         }
 
         final StringBuilder retStr = new StringBuilder();
@@ -342,7 +331,7 @@
         boolean defaulted = (in == null);
         if (defaulted) {
             clone = new DescriptorSupport();
-            MODELMBEAN_LOGGER.finer("Null Descriptor, creating new.");
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Null Descriptor, creating new.");
         } else {
             clone = (Descriptor) in.clone();
         }
@@ -350,19 +339,19 @@
         //Setting defaults.
         if (defaulted && clone.getFieldValue("name")==null) {
             clone.setField("name", this.getName());
-            MODELMBEAN_LOGGER.finer("Defaulting Descriptor name to " + this.getName());
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Defaulting Descriptor name to " + this.getName());
         }
         if (defaulted && clone.getFieldValue("descriptorType")==null) {
             clone.setField("descriptorType", "notification");
-            MODELMBEAN_LOGGER.finer("Defaulting descriptorType to \"notification\"");
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Defaulting descriptorType to \"notification\"");
         }
         if (clone.getFieldValue("displayName") == null) {
             clone.setField("displayName",this.getName());
-            MODELMBEAN_LOGGER.finer("Defaulting Descriptor displayName to " + this.getName());
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Defaulting Descriptor displayName to " + this.getName());
         }
         if (clone.getFieldValue("severity") == null) {
             clone.setField("severity", "6");
-            MODELMBEAN_LOGGER.finer("Defaulting Descriptor severity field to 6");
+            MODELMBEAN_LOGGER.log(Level.TRACE, "Defaulting Descriptor severity field to 6");
         }
 
         //Checking validity