From e824f1ca02d897dfb336e2b780e3969bb1692a51 Mon Sep 17 00:00:00 2001 From: dfuchs Date: Fri, 30 May 2008 14:35:43 +0200 Subject: [PATCH] 6592586: RequiredModelMBean prints a WARNING message when calling getAttributes() for a non-existing attr Summary: Switched traces to FINER - except when logging fails - in which cases the traces are logged to FINE Reviewed-by: emcmanus --- .../modelmbean/RequiredModelMBean.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java b/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java index 86ce9d904..6a72302ea 100644 --- a/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java +++ b/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java @@ -1696,8 +1696,8 @@ public class RequiredModelMBean } catch (Exception e) { // eat exceptions because interface doesn't have an // exception on it - if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) { - MODELMBEAN_LOGGER.logp(Level.WARNING, + if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) { + MODELMBEAN_LOGGER.logp(Level.FINER, RequiredModelMBean.class.getName(), "getAttributes(String[])", "Failed to get \"" + attrNames[i] + "\": ", e); @@ -1857,8 +1857,8 @@ public class RequiredModelMBean attrValue.getClass().getName() + " received."); } catch (ClassNotFoundException x) { - if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) { - MODELMBEAN_LOGGER.logp(Level.WARNING, + if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) { + MODELMBEAN_LOGGER.logp(Level.FINER, RequiredModelMBean.class.getName(), "setAttribute(Attribute)","Class " + attrType + " for attribute " @@ -2224,8 +2224,8 @@ public class RequiredModelMBean ntfyObj.getMessage() + " Severity = " + (String)ntfyDesc.getFieldValue("severity")); } catch (Exception e) { - if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) { - MODELMBEAN_LOGGER.logp(Level.WARNING, + if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) { + MODELMBEAN_LOGGER.logp(Level.FINE, RequiredModelMBean.class.getName(), "sendNotification(Notification)", "Failed to log " + @@ -2618,8 +2618,8 @@ public class RequiredModelMBean " Old value = " + oldv + " New value = " + newv); } catch (Exception e) { - if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) { - MODELMBEAN_LOGGER.logp(Level.WARNING, + if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) { + MODELMBEAN_LOGGER.logp(Level.FINE, RequiredModelMBean.class.getName(),mth, "Failed to log " + ntfyObj.getType() + " notification: ", e); @@ -2644,8 +2644,8 @@ public class RequiredModelMBean " Old value = " + oldv + " New value = " + newv); } catch (Exception e) { - if (MODELMBEAN_LOGGER.isLoggable(Level.WARNING)) { - MODELMBEAN_LOGGER.logp(Level.WARNING, + if (MODELMBEAN_LOGGER.isLoggable(Level.FINE)) { + MODELMBEAN_LOGGER.logp(Level.FINE, RequiredModelMBean.class.getName(),mth, "Failed to log " + ntfyObj.getType() + " notification: ", e); -- GitLab