diff options
Diffstat (limited to 'javax/management/Notification.java')
-rw-r--r-- | javax/management/Notification.java | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/javax/management/Notification.java b/javax/management/Notification.java index 52c11de06..2bbc206a8 100644 --- a/javax/management/Notification.java +++ b/javax/management/Notification.java @@ -37,6 +37,9 @@ exception statement from your version. */ package javax.management; +import java.io.IOException; +import java.io.ObjectOutputStream; + import java.util.Date; import java.util.EventObject; @@ -66,6 +69,11 @@ public class Notification { /** + * Compatible with JDK 1.6 + */ + private static final long serialVersionUID = -7516092053498031989L; + + /** * The notification message. * * @serial the notification message. @@ -141,7 +149,7 @@ public class Notification public Notification(String type, Object source, long sequenceNumber, long timeStamp) { - this(type, source, sequenceNumber, timeStamp, null); + this(type, source, sequenceNumber, timeStamp, ""); } /** @@ -159,6 +167,7 @@ public class Notification { super(source); this.type = type; + this.source = source; this.sequenceNumber = sequenceNumber; this.timeStamp = timeStamp; this.message = message; @@ -310,5 +319,17 @@ public class Notification + "]"; } + /** + * Serialize the {@link Notification}. + * + * @param out the output stream to write to. + * @throws IOException if an I/O error occurs. + */ + private void writeObject(ObjectOutputStream out) + throws IOException + { + out.defaultWriteObject(); + } + } |