Mercurial > hg > release > icedtea7-forest-2.1 > jdk
changeset 4922:8f3def9cab48
8009034: Improve resulting notifications in JMX
Summary: Disallowing access to mutable shared arrays
Reviewed-by: dfuchs, mchung, skoivu
author | jbachorik |
---|---|
date | Tue, 12 Mar 2013 11:09:37 +0100 |
parents | fbfcbc8fa136 |
children | d6cdeea8b194 |
files | src/share/classes/javax/management/remote/NotificationResult.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/javax/management/remote/NotificationResult.java Tue Mar 26 11:56:00 2013 +0400 +++ b/src/share/classes/javax/management/remote/NotificationResult.java Tue Mar 12 11:09:37 2013 +0100 @@ -89,7 +89,7 @@ this.earliestSequenceNumber = earliestSequenceNumber; this.nextSequenceNumber = nextSequenceNumber; - this.targetedNotifications = targetedNotifications; + this.targetedNotifications = (targetedNotifications.length == 0 ? targetedNotifications : targetedNotifications.clone()); } /** @@ -122,7 +122,7 @@ * listeners they correspond to. This array can be empty. */ public TargetedNotification[] getTargetedNotifications() { - return targetedNotifications; + return targetedNotifications.length == 0 ? targetedNotifications : targetedNotifications.clone(); } /**