I'm checking this in. This fixes some serialization buglets in javax.xml that were pointed out by japi (against 1.5). Normally I would ask for comment on a patch well outside my area like this, but this one seems pretty obvious.
For some of these classes, our javadoc says '@since 1.3', but Sun's javadoc claims they are since 1.5. I don't know what is right here. Tom Index: ChangeLog from Tom Tromey <[EMAIL PROTECTED]> * javax/xml/xpath/XPathFunctionException.java (serialVersionUID): New field. * javax/xml/xpath/XPathFactoryConfigurationException.java (serialVersionUID): New field. * javax/xml/xpath/XPathExpressionException.java (serialVersionUID): New field. * javax/xml/xpath/XPathException.java (serialVersionUID): New field. * javax/xml/transform/TransformerConfigurationException.java (locator): Removed. (TransformerConfigurationException): Pass locator to super constructor. (serialVersionUID): New field. * javax/xml/transform/TransformerFactoryConfigurationError.java (serialVersionUID): New field. * javax/xml/transform/TransformerException.java (containedException): Renamed field. (serialVersionUID): New field. Index: javax/xml/transform/TransformerConfigurationException.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/transform/TransformerConfigurationException.java,v retrieving revision 1.3 diff -u -r1.3 TransformerConfigurationException.java --- javax/xml/transform/TransformerConfigurationException.java 2 Jul 2005 20:32:52 -0000 1.3 +++ javax/xml/transform/TransformerConfigurationException.java 19 Sep 2005 15:16:19 -0000 @@ -45,9 +45,8 @@ public class TransformerConfigurationException extends TransformerException { + private static final long serialVersionUID = 1285547467942875745L; - private SourceLocator locator; - /** * Constructor with no detail message. */ @@ -96,8 +95,7 @@ SourceLocator locator, Throwable e) { - super(message, e); - this.locator = locator; + super(message, locator, e); } } Index: javax/xml/transform/TransformerException.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/transform/TransformerException.java,v retrieving revision 1.3 diff -u -r1.3 TransformerException.java --- javax/xml/transform/TransformerException.java 2 Jul 2005 20:32:52 -0000 1.3 +++ javax/xml/transform/TransformerException.java 19 Sep 2005 15:16:19 -0000 @@ -47,9 +47,11 @@ public class TransformerException extends Exception { + private static final long serialVersionUID = 975798773772956428L; + // Field names fixed by serialization spec. private SourceLocator locator; - private Throwable cause; + private Throwable containedException; /** * Constructor with a detail message. @@ -94,7 +96,7 @@ if (cause != null) { initCause(cause); - this.cause = cause; + this.containedException = cause; } } @@ -119,7 +121,7 @@ */ public Throwable getException() { - return cause; + return containedException; } /** @@ -127,7 +129,7 @@ */ public Throwable getCause() { - return cause; + return containedException; } /** @@ -143,7 +145,7 @@ */ public Throwable initCause(Throwable cause) { - if (this.cause != null) + if (this.containedException != null) { throw new IllegalStateException(); } @@ -151,7 +153,7 @@ { throw new IllegalArgumentException(); } - this.cause = cause; + this.containedException = cause; return this; } @@ -221,20 +223,20 @@ public void printStackTrace(PrintStream s) { super.printStackTrace(s); - if (cause != null) + if (containedException != null) { s.print("caused by "); - cause.printStackTrace(s); + containedException.printStackTrace(s); } } public void printStackTrace(PrintWriter s) { super.printStackTrace(s); - if (cause != null) + if (containedException != null) { s.print("caused by "); - cause.printStackTrace(s); + containedException.printStackTrace(s); } } Index: javax/xml/transform/TransformerFactoryConfigurationError.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/transform/TransformerFactoryConfigurationError.java,v retrieving revision 1.3 diff -u -r1.3 TransformerFactoryConfigurationError.java --- javax/xml/transform/TransformerFactoryConfigurationError.java 2 Jul 2005 20:32:52 -0000 1.3 +++ javax/xml/transform/TransformerFactoryConfigurationError.java 19 Sep 2005 15:16:19 -0000 @@ -44,7 +44,9 @@ public class TransformerFactoryConfigurationError extends Error { + private static final long serialVersionUID = -6527718720676281516L; + // Name is fixed by the serialization spec. private final Exception exception; /** Index: javax/xml/xpath/XPathException.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/xpath/XPathException.java,v retrieving revision 1.3 diff -u -r1.3 XPathException.java --- javax/xml/xpath/XPathException.java 2 Jul 2005 20:32:52 -0000 1.3 +++ javax/xml/xpath/XPathException.java 19 Sep 2005 15:16:20 -0000 @@ -49,7 +49,9 @@ public class XPathException extends Exception { + private static final long serialVersionUID = -1837080260374986980L; + // Name is fixed by serialization spec. Throwable cause; public XPathException(String message) Index: javax/xml/xpath/XPathExpressionException.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/xpath/XPathExpressionException.java,v retrieving revision 1.3 diff -u -r1.3 XPathExpressionException.java --- javax/xml/xpath/XPathExpressionException.java 2 Jul 2005 20:32:52 -0000 1.3 +++ javax/xml/xpath/XPathExpressionException.java 19 Sep 2005 15:16:20 -0000 @@ -46,6 +46,7 @@ public class XPathExpressionException extends XPathException { + private static final long serialVersionUID = -1837080260374986980L; public XPathExpressionException(String message) { Index: javax/xml/xpath/XPathFactoryConfigurationException.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/xpath/XPathFactoryConfigurationException.java,v retrieving revision 1.3 diff -u -r1.3 XPathFactoryConfigurationException.java --- javax/xml/xpath/XPathFactoryConfigurationException.java 2 Jul 2005 20:32:52 -0000 1.3 +++ javax/xml/xpath/XPathFactoryConfigurationException.java 19 Sep 2005 15:16:20 -0000 @@ -46,6 +46,7 @@ public class XPathFactoryConfigurationException extends XPathException { + private static final long serialVersionUID = -1837080260374986980L; public XPathFactoryConfigurationException(String message) { Index: javax/xml/xpath/XPathFunctionException.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/xml/xpath/XPathFunctionException.java,v retrieving revision 1.3 diff -u -r1.3 XPathFunctionException.java --- javax/xml/xpath/XPathFunctionException.java 2 Jul 2005 20:32:52 -0000 1.3 +++ javax/xml/xpath/XPathFunctionException.java 19 Sep 2005 15:16:20 -0000 @@ -46,6 +46,7 @@ public class XPathFunctionException extends XPathExpressionException { + private static final long serialVersionUID = -1837080260374986980L; public XPathFunctionException(String message) { _______________________________________________ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches