summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-14 16:19:30 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-09-14 16:19:30 +0000
commit1c01703b5f21b78be8baf2185cbd09805baebf04 (patch)
tree1ecbcc210f5ab147dfc2ede4723410eaee4bd477 /libjava
parentd863d3a75d468444c7d17503770b6ae170159075 (diff)
downloadgcc-1c01703b5f21b78be8baf2185cbd09805baebf04.tar.gz
* java/lang/CloneNotSupportedException.java: Re-merged with
Classpath. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog5
-rw-r--r--libjava/java/lang/CloneNotSupportedException.java38
2 files changed, 27 insertions, 16 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 2278b73c0e6..5f9f539e8d3 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,8 @@
+2001-09-14 Tom Tromey <tromey@redhat.com>
+
+ * java/lang/CloneNotSupportedException.java: Re-merged with
+ Classpath.
+
2001-09-14 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* java/io/File.java (normalizePath): Use equals() not '==' for string
diff --git a/libjava/java/lang/CloneNotSupportedException.java b/libjava/java/lang/CloneNotSupportedException.java
index 23e199a27f0..1ec1e7c58b9 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 <code>CloneNotSupportedException</code> is thrown by
- * the <code>clone</code> method of <code>Object</code> to indicate
- * that object does not implement the <code>Cloneable</code> 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.
+ * <p>
+ *
+ * Notice that calling <code>clone()</code> 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 <warrenl@cygnus.com>
- * @date September 18, 1998.
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @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);
+ }
}