From 6d8b8de30f9893f4e7c4833e98055bffca5d4030 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 14 Sep 2001 16:19:30 +0000 Subject: CloneNotSupportedException.java: Re-merged with Classpath. * java/lang/CloneNotSupportedException.java: Re-merged with Classpath. From-SVN: r45599 --- libjava/java/lang/CloneNotSupportedException.java | 38 +++++++++++++---------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'libjava/java') diff --git a/libjava/java/lang/CloneNotSupportedException.java b/libjava/java/lang/CloneNotSupportedException.java index 23e199a..1ec1e7c 100644 --- a/libjava/java/lang/CloneNotSupportedException.java +++ b/libjava/java/lang/CloneNotSupportedException.java @@ -36,36 +36,42 @@ package java.lang; */ /** - * Exceptions may be thrown by one part of a Java program and caught - * by another in order to deal with exceptional conditions. - * Thrown to indicate an object should not or could not be cloned. - * For example CloneNotSupportedException is thrown by - * the clone method of Object to indicate - * that object does not implement the Cloneable interface. + * Thrown to indicate an object should not or could not be cloned. This + * includes the case when {@link Object#clone()} is called on an object + * which does not implement the {@link Cloneable} interface. + *

+ * + * Notice that calling clone() on an array will never produce + * this exception, as the VM will always succeed in copying the array, or + * cause an OutOfMemoryError first. * - * @since JDK 1.0 - * * @author Brian Jones * @author Warren Levy - * @date September 18, 1998. + * @author Eric Blake + * @since 1.0 + * @see Cloneable + * @see Object#clone() */ public class CloneNotSupportedException extends Exception { - static final long serialVersionUID = 5195511250079656443L; + /** + * compatible with JDK 1.0+ + */ + private static final long serialVersionUID = 5195511250079656443L; /** * Create an exception without a message. */ public CloneNotSupportedException() - { - super(); - } + { + } /** * Create an exception with a message. + * @param s the error message */ public CloneNotSupportedException(String s) - { - super(s); - } + { + super(s); + } } -- cgit v1.1