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
--- a/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Thu May 29 15:33:14 2008 +0200
+++ b/jdk/src/share/classes/javax/management/modelmbean/RequiredModelMBean.java Fri May 30 14:35:43 2008 +0200
@@ -1696,8 +1696,8 @@
} 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 @@
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 @@
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 @@
" 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 @@
" 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);