aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2002-10-04 16:47:36 +0000
committerMark Wielaard <mark@gcc.gnu.org>2002-10-04 16:47:36 +0000
commit0a3fbe88bb4a7943dc22f9c6a11a19a5dffa44fb (patch)
tree2e4de08f97c948f15fc4d127790225d49581d95b /libjava
parentf91f86e7dac29f0e2d965fe0c50b7f6e76fb27bb (diff)
downloadgcc-0a3fbe88bb4a7943dc22f9c6a11a19a5dffa44fb.zip
gcc-0a3fbe88bb4a7943dc22f9c6a11a19a5dffa44fb.tar.gz
gcc-0a3fbe88bb4a7943dc22f9c6a11a19a5dffa44fb.tar.bz2
* java/lang/Throwable.java: Remerge with Classpath.
From-SVN: r57823
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog4
-rw-r--r--libjava/java/lang/Throwable.java22
2 files changed, 12 insertions, 14 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index ff2671d..1f56f0e 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,7 @@
+2002-10-04 Mark Wielaard <mark@klomp.org>
+
+ * java/lang/Throwable.java: Remerge with Classpath.
+
2002-10-04 Michael Koch <konqueror@gmx.de>
* java/net/InetAddress.java:
diff --git a/libjava/java/lang/Throwable.java b/libjava/java/lang/Throwable.java
index 613f43f..62db8fd 100644
--- a/libjava/java/lang/Throwable.java
+++ b/libjava/java/lang/Throwable.java
@@ -1,5 +1,4 @@
-/* java.lang.Throwable -- Reference implementation of root class for
- all Exceptions and Errors
+/* java.lang.Throwable -- Root class for all Exceptions and Errors
Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -46,12 +45,6 @@ import java.io.ObjectInputStream;
import java.io.IOException;
import java.io.OutputStream;
-/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
- * "The Java Language Specification", ISBN 0-201-63451-1
- * Status: Sufficient for compiled code, but methods applicable to
- * bytecode not implemented. JDK 1.1.
- */
-
/**
* Throwable is the superclass of all exceptions that can be raised.
*
@@ -166,7 +159,7 @@ public class Throwable implements Serializable
public Throwable(String message)
{
fillInStackTrace();
- detailMessage = message;
+ detailMessage = message;
}
/**
@@ -373,7 +366,7 @@ public class Throwable implements Serializable
}
/**
- * <p>Prints the exception, the detailed message and the stack trace
+ * Prints the exception, the detailed message and the stack trace
* associated with this Throwable to the given <code>PrintWriter</code>.
* The actual output written is implemention specific. Use the result of
* <code>getStackTrace()</code> when more precise information is needed.
@@ -533,7 +526,7 @@ public class Throwable implements Serializable
* serialization according to the context of the remote call.
* <p>
* The contents of the given stacktrace is copied so changes to the
- * original * array do not change the stack trace elements of this
+ * original array do not change the stack trace elements of this
* throwable.
*
* @param stackTrace the new trace to use
@@ -546,10 +539,11 @@ public class Throwable implements Serializable
StackTraceElement[] st = new StackTraceElement[i];
while (--i >= 0)
- if (stackTrace[i] == null)
- throw new NullPointerException();
- else
+ {
st[i] = stackTrace[i];
+ if (st[i] == null)
+ throw new NullPointerException("Element " + i + " null");
+ }
this.stackTrace = st;
}