-
Bug
-
Resolution: Fixed
-
P4
-
15
-
b24
-
Not verified
A work-in-progress serialization focused annotation processor produced the following warnings about unexpected serialization related method declarations.
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java:
297: warning: Serialization-related method writeObject(java.io.ObjectOutputStream) in CLASS com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl has unexpected throws clause including java.lang.ClassNotFoundException
--- Remove ClassNotFoundException, it can not be thrown in writeObject
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java:
1860: warning: Serialization-related method writeReplace() in CLASS com.sun.org.apache.xerces.internal.jaxp.datatype.DurationImpl has unexpected throws clause including java.io.IOException
-- Remove throws IOException; writeReplace does not do any IO to throw an exception.
Throwing declared exceptions in ReadObject, does not have the desired effect. ClassNotFoundException does not need to be converted to a different exception.
-- add ClassNotFoundException to the throws clause
-- Remove the try {} catch (ClassNotFoundException x) {}.
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java:
136: warning: Serialization-related method readObject(java.io.ObjectInputStream) in CLASS com.sun.org.apache.xpath.internal.axes.LocPathIterator has unexpected throws clause including javax.xml.transform.TransformerException
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java:
69: warning: Serialization-related method readObject(java.io.ObjectInputStream) in CLASS com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest has unexpected throws clause including javax.xml.transform.TransformerException
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java:
260: warning: Serialization-related method readObject(java.io.ObjectInputStream) in CLASS com.sun.org.apache.xpath.internal.axes.UnionPathIterator has unexpected throws clause including javax.xml.transform.TransformerException
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java:
297: warning: Serialization-related method writeObject(java.io.ObjectOutputStream) in CLASS com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl has unexpected throws clause including java.lang.ClassNotFoundException
--- Remove ClassNotFoundException, it can not be thrown in writeObject
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java:
1860: warning: Serialization-related method writeReplace() in CLASS com.sun.org.apache.xerces.internal.jaxp.datatype.DurationImpl has unexpected throws clause including java.io.IOException
-- Remove throws IOException; writeReplace does not do any IO to throw an exception.
Throwing declared exceptions in ReadObject, does not have the desired effect. ClassNotFoundException does not need to be converted to a different exception.
-- add ClassNotFoundException to the throws clause
-- Remove the try {} catch (ClassNotFoundException x) {}.
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/LocPathIterator.java:
136: warning: Serialization-related method readObject(java.io.ObjectInputStream) in CLASS com.sun.org.apache.xpath.internal.axes.LocPathIterator has unexpected throws clause including javax.xml.transform.TransformerException
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/PredicatedNodeTest.java:
69: warning: Serialization-related method readObject(java.io.ObjectInputStream) in CLASS com.sun.org.apache.xpath.internal.axes.PredicatedNodeTest has unexpected throws clause including javax.xml.transform.TransformerException
/ws/jdk-dev/open/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java:
260: warning: Serialization-related method readObject(java.io.ObjectInputStream) in CLASS com.sun.org.apache.xpath.internal.axes.UnionPathIterator has unexpected throws clause including javax.xml.transform.TransformerException
- relates to
-
JDK-8245238 validate-headers build failure
- Closed