Index: java/io/OptionalDataException.java =================================================================== RCS file: /cvs/classpath/java/io/OptionalDataException.java,v retrieving revision 1.3 diff -u -r1.3 OptionalDataException.java --- java/io/OptionalDataException.java 2000/03/16 19:21:19 1.3 +++ java/io/OptionalDataException.java 2001/03/11 15:41:19 @@ -1,5 +1,5 @@ -/* OptionalDataException.java -- Unexpected end of file exception - Copyright (C) 1998 Free Software Foundation, Inc. +/* OptionalDataException.java -- indicates unexpected data in serialised stream + Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -27,6 +27,10 @@ package java.io; +/* Written using on-line Java Platform 1.2 API Specification. + * Status: Believed complete and correct. + */ + /** * This exception is thrown when unexpected data appears in the input * stream from which a serialized object is being read. The field @@ -37,10 +41,14 @@ * @version 0.0 * * @author Aaron M. Renn (address@hidden) + * @author Warren Levy + * @date February 7, 2000. */ public class OptionalDataException extends ObjectStreamException { +private static final long serialVersionUID = -8011121865681257820L; + /* * Instance Variables */ @@ -69,10 +77,10 @@ * @param eof 'true' if end of stream reached, 'false' otherwise * @param count The number of valid bytes to be read. */ -OptionalDataException() +OptionalDataException(boolean eof, int count) { this.eof = eof; - this.length = length; + this.length = count; } } // class OptionalDataException Index: java/lang/ArrayIndexOutOfBoundsException.java =================================================================== RCS file: /cvs/classpath/java/lang/ArrayIndexOutOfBoundsException.java,v retrieving revision 1.7 diff -u -r1.7 ArrayIndexOutOfBoundsException.java --- java/lang/ArrayIndexOutOfBoundsException.java 2000/03/16 23:31:18 1.7 +++ java/lang/ArrayIndexOutOfBoundsException.java 2001/03/11 15:41:19 @@ -1,6 +1,6 @@ /* ArrayIndexOutOfBoundsException.java -- exception thrown when accessing an illegal index. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -28,6 +28,13 @@ package java.lang; +/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 + * "The Java Language Specification", ISBN 0-201-63451-1 + * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. + * Status: Believed complete and correct. + */ + + /** * Exceptions may be thrown by one part of a Java program and caught * by another in order to deal with exceptional conditions, in this case @@ -38,6 +45,8 @@ * @since JDK 1.0 * * @author Brian Jones + * @author Warren Levy + * @date September 18, 1998. */ public class ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException { @@ -61,8 +70,7 @@ * Create an exception indicating the illegal index. */ public ArrayIndexOutOfBoundsException(int index) { - super(String.valueOf(index)); + super("Array index out of range: " + index); } - } Index: java/lang/ExceptionInInitializerError.java =================================================================== RCS file: /cvs/classpath/java/lang/ExceptionInInitializerError.java,v retrieving revision 1.4 diff -u -r1.4 ExceptionInInitializerError.java --- java/lang/ExceptionInInitializerError.java 2000/03/16 23:31:24 1.4 +++ java/lang/ExceptionInInitializerError.java 2001/03/11 15:41:19 @@ -1,5 +1,5 @@ /* ExceptionInInitializerError.java - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -27,12 +27,15 @@ package java.lang; -import java.io.ObjectOutputStream; -import java.io.ObjectInputStream; -import java.io.IOException; import java.io.PrintStream; import java.io.PrintWriter; +/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 + * "The Java Language Specification", ISBN 0-201-63451-1 + * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. + * Status: Believed complete and correct. + */ + /** * An ExceptionInInitializerError is thrown when an * unexpected exception has occurred in a static initializer or the @@ -41,12 +44,14 @@ * @since JDK 1.1 * * @author Brian Jones + * @author Tom Tromey + * @date October 1, 1998 */ public class ExceptionInInitializerError extends LinkageError { static final long serialVersionUID = 1521711792217232256L; - private Throwable t = null; + private Throwable exception = null; /** * Create an error without a message. @@ -73,7 +78,7 @@ public ExceptionInInitializerError(Throwable t) { super(); - this.t = t; + exception = t; } /** @@ -84,7 +89,7 @@ */ public Throwable getException() { - return t; + return exception; } /** @@ -92,13 +97,13 @@ */ public void printStackTrace() { - if (t == null) + if (exception == null) { super.printStackTrace(); } else { - t.printStackTrace(); + exception.printStackTrace(); } } @@ -108,13 +113,13 @@ */ public void printStackTrace(PrintStream ps) { - if (t == null) + if (exception == null) { super.printStackTrace(ps); } else { - t.printStackTrace(ps); + exception.printStackTrace(ps); } } @@ -124,36 +129,13 @@ */ public void printStackTrace(PrintWriter pw) { - if (t == null) + if (exception == null) { super.printStackTrace(pw); } else { - t.printStackTrace(pw); + exception.printStackTrace(pw); } - } - - /** - * Serialize the object in a manner binary compatible with the JDK 1.2 - */ - private void writeObject(java.io.ObjectOutputStream s) - throws IOException - { - ObjectOutputStream.PutField oFields; - oFields = s.putFields(); - oFields.put("exception", this.t); - s.writeFields(); - } - - /** - * Deserialize the object in a manner binary compatible with the JDK 1.2 - */ - private void readObject(java.io.ObjectInputStream s) - throws IOException, ClassNotFoundException - { - ObjectInputStream.GetField oFields; - oFields = s.readFields(); - this.t = (Throwable)oFields.get("exception", (Throwable)null); } } Index: java/lang/StringIndexOutOfBoundsException.java =================================================================== RCS file: /cvs/classpath/java/lang/StringIndexOutOfBoundsException.java,v retrieving revision 1.6 diff -u -r1.6 StringIndexOutOfBoundsException.java --- java/lang/StringIndexOutOfBoundsException.java 2000/03/16 23:31:40 1.6 +++ java/lang/StringIndexOutOfBoundsException.java 2001/03/11 15:41:19 @@ -1,6 +1,6 @@ /* StringIndexOutOfBoundsException.java -- exception thrown to indicate an attempt to access an index which is out of bounds. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -28,6 +28,12 @@ package java.lang; +/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 + * "The Java Language Specification", ISBN 0-201-63451-1 + * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. + * Status: Believed complete and correct. + */ + /** * Exceptions may be thrown by one part of a Java program and caught * by another in order to deal with exceptional conditions. @@ -40,6 +46,8 @@ * @since JDK 1.0 * * @author Brian Jones + * @author Warren Levy + * @date September 18, 1998. */ public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException { @@ -66,6 +74,6 @@ */ public StringIndexOutOfBoundsException(int index) { - super(String.valueOf(index)); + super("String index out of range: " + index); } } Index: java/lang/reflect/InvocationTargetException.java =================================================================== RCS file: /cvs/classpath/java/lang/reflect/InvocationTargetException.java,v retrieving revision 1.4 diff -u -r1.4 InvocationTargetException.java --- java/lang/reflect/InvocationTargetException.java 2000/03/16 22:24:47 1.4 +++ java/lang/reflect/InvocationTargetException.java 2001/03/11 15:41:19 @@ -1,5 +1,5 @@ -/* java.lang.reflect.InvocationTargetException - Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* InvocationTargetException.java - Wrapper exception for reflection + Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -27,14 +27,23 @@ package java.lang.reflect; -import java.io.*; +import java.io.PrintStream; +import java.io.PrintWriter; +/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 + * "The Java Language Specification", ISBN 0-201-63451-1 + * Status: Believed complete and correct. + */ + /** * InvocationTargetException is sort of a way to "wrap" whatever exception * comes up when a method or constructor is called via Reflection. * * @author John Keiser * @version 1.1.0, 31 May 1998 + * @author Tom Tromey + * @date December 12, 1998 + * * @see Method#invoke(Object,Object[]) * @see Constructor#newInstance(Object[]) */ @@ -42,7 +51,8 @@ public class InvocationTargetException extends Exception { static final long serialVersionUID = 4085088731926701167L; - private Throwable targetException = null; + + private Throwable target = null; protected InvocationTargetException() { @@ -57,7 +67,7 @@ public InvocationTargetException(Throwable targetException) { super(); - this.targetException = targetException; + target = targetException; } /** @@ -70,7 +80,7 @@ public InvocationTargetException(Throwable targetException, String err) { super(err); - this.targetException = targetException; + target = targetException; } /** @@ -80,53 +90,30 @@ */ public Throwable getTargetException() { - return targetException; + return target; } public void printStackTrace() { - if (targetException == null) + if (target == null) super.printStackTrace(); else - targetException.printStackTrace(); + target.printStackTrace(); } public void printStackTrace(PrintStream ps) { - if (targetException == null) + if (target == null) super.printStackTrace(ps); else - targetException.printStackTrace(ps); + target.printStackTrace(ps); } public void printStackTrace(PrintWriter pw) { - if (targetException == null) + if (target == null) super.printStackTrace(pw); else - targetException.printStackTrace(pw); - } - - /** - * Serialize the object in a manner binary compatible with the JDK 1.2 - */ - private void writeObject(java.io.ObjectOutputStream s) - throws IOException - { - ObjectOutputStream.PutField oFields; - oFields = s.putFields(); - oFields.put("target", targetException); - s.writeFields(); - } - - /** - * Deserialize the object in a manner binary compatible with the JDK 1.2 - */ - private void readObject(java.io.ObjectInputStream s) - throws IOException, ClassNotFoundException - { - ObjectInputStream.GetField oFields; - oFields = s.readFields(); - targetException = (Throwable)oFields.get("target", (Throwable)null); + target.printStackTrace(pw); } } Index: java/text/ParseException.java =================================================================== RCS file: /cvs/classpath/java/text/ParseException.java,v retrieving revision 1.2 diff -u -r1.2 ParseException.java --- java/text/ParseException.java 2000/03/15 22:42:44 1.2 +++ java/text/ParseException.java 2001/03/11 15:41:19 @@ -1,5 +1,5 @@ /* ParseException.java -- An error occurred while parsing. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -27,12 +27,19 @@ package java.text; +/* Written using "Java Class Libraries", 2nd edition, plus online + * API docs for JDK 1.2 beta from http://www.javasoft.com. + * Status: Believed complete and correct. + */ + /** * This exception is thrown when an unexpected error occurs during parsing. * * @version 0.0 * * @author Aaron M. Renn (address@hidden) + * @author Per Bothner + * @date October 25, 1998. */ public class ParseException extends Exception { @@ -44,7 +51,7 @@ /** * This is the position where the error was encountered. */ -private int offset; +private int errorOffset; /*************************************************************************/ @@ -64,7 +71,7 @@ { super(s); - this.offset = offset; + errorOffset = offset; } /*************************************************************************/ @@ -77,7 +84,7 @@ public int getErrorOffset() { - return(offset); + return(errorOffset); } } // class ParseException