From 8aa540d2f783474d1d2e06f16744bf67b9c1facc Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 10 Mar 2006 21:46:48 +0000 Subject: Imported GNU Classpath 0.90 Imported GNU Classpath 0.90 * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore. * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant. * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5. * java/lang/Math.java: New override file. * java/lang/Character.java: Merged from Classpath. (start, end): Now 'int's. (canonicalName): New field. (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants. (UnicodeBlock): Added argument. (of): New overload. (forName): New method. Updated unicode blocks. (sets): Updated. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r111942 --- .../classpath/javax/sound/sampled/LineEvent.java | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'libjava/classpath/javax/sound/sampled/LineEvent.java') diff --git a/libjava/classpath/javax/sound/sampled/LineEvent.java b/libjava/classpath/javax/sound/sampled/LineEvent.java index 7bba2cd..db92593 100644 --- a/libjava/classpath/javax/sound/sampled/LineEvent.java +++ b/libjava/classpath/javax/sound/sampled/LineEvent.java @@ -38,16 +38,24 @@ exception statement from your version. */ package javax.sound.sampled; +import java.io.IOException; +import java.io.NotSerializableException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; import java.util.EventObject; -// FIXME: attempts to serialize this should fail - /** * This class holds information about a state change of a Line. + * @specnote This class is not really serializable, and attempts to + * serialize it will throw {@link NotSerializableException}. * @since 1.3 */ public class LineEvent extends EventObject { + // We define this even though this class can't be serialized, in + // order to placate the compiler. + private static final long serialVersionUID = -1274246333383880410L; + /** * This class represents the kinds of state changes that can occur * to a Line. The standard states are availabe as static instances. @@ -147,4 +155,16 @@ public class LineEvent extends EventObject return ("type=" + type + "; framePosition=" + framePosition + "line=" + line); } + + private void readObject(ObjectInputStream ois) + throws IOException + { + throw new NotSerializableException("LineEvent is not serializable"); + } + + private void writeObject(ObjectOutputStream oos) + throws IOException + { + throw new NotSerializableException("LineEvent is not serializable"); + } } -- cgit v1.1