Mercurial > hg > release > icedtea7-forest-2.3 > jdk
changeset 6162:7fd0922d6ed2 jdk7u25-b01
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 | ee66b912f65b |
children | b2bd9d9b28f5 |
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 12 09:34:26 2013 +0100 +++ 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(); } /**