6656633: getNotificationInfo methods static mutable

Reviewed-by: emcmanus, jfdenise
This commit is contained in:
Daniel Fuchs 2009-03-09 21:49:56 +01:00
parent 6c11535cdd
commit 605e712ecd
3 changed files with 6 additions and 3 deletions

View File

@ -596,7 +596,7 @@ public class CounterMonitor extends Monitor implements CounterMonitorMBean {
* types sent by the counter monitor.
*/
public MBeanNotificationInfo[] getNotificationInfo() {
return notifsInfo;
return notifsInfo.clone();
}
/*

View File

@ -478,7 +478,7 @@ public class GaugeMonitor extends Monitor implements GaugeMonitorMBean {
* types sent by the gauge monitor.
*/
public MBeanNotificationInfo[] getNotificationInfo() {
return notifsInfo;
return notifsInfo.clone();
}
/*

View File

@ -184,6 +184,7 @@ public class StringMonitor extends Monitor implements StringMonitorMBean {
* @return The derived gauge of the specified object.
*
*/
@Override
public synchronized String getDerivedGauge(ObjectName object) {
return (String) super.getDerivedGauge(object);
}
@ -199,6 +200,7 @@ public class StringMonitor extends Monitor implements StringMonitorMBean {
* @return The derived gauge timestamp of the specified object.
*
*/
@Override
public synchronized long getDerivedGaugeTimeStamp(ObjectName object) {
return super.getDerivedGaugeTimeStamp(object);
}
@ -341,8 +343,9 @@ public class StringMonitor extends Monitor implements StringMonitorMBean {
* the Java class of the notification and the notification types sent by
* the string monitor.
*/
@Override
public MBeanNotificationInfo[] getNotificationInfo() {
return notifsInfo;
return notifsInfo.clone();
}
/*