Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8189640

Specify Serial Version UIDs for JAXP

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: tbd_major
    • Component/s: xml
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      Add serialVersionUID to fix serial warnings.

      Problem

      Several API classes are missing serialVersionUID.

      Solution

      In all cases, add serialVersionUID generated by serialver.

      I've tested all classes in the specification section with JDK 1.4 to JDK 9. For each of the classes, serialver returned the same serialVersionUID if the class existed in the tested JDK version.

      Specification

      src/java.xml/share/classes/javax/xml/datatype/DatatypeConfigurationException.java

       public class DatatypeConfigurationException extends Exception {
      +    private static final long serialVersionUID = -1699373159027047238L;

      src/java.xml/share/classes/javax/xml/namespace/QName.java

       public class QName implements Serializable {
      +    private static final long serialVersionUID = -9120448754896609940L;

      src/java.xml/share/classes/javax/xml/parsers/ParserConfigurationException.java

       public class ParserConfigurationException extends Exception {
      +    private static final long serialVersionUID = -3688849216575373917L;

      src/java.xml/share/classes/javax/xml/stream/XMLStreamException.java

       public class XMLStreamException extends Exception {
      +  private static final long serialVersionUID = 2018819321811497362L;

      src/java.xml/share/classes/org/w3c/dom/events/EventException.java

       public class EventException extends RuntimeException {
      +    private static final long serialVersionUID = 242753408332692061L;

      src/java.xml/share/classes/org/w3c/dom/ls/LSException.java

       public class LSException extends RuntimeException {
      +    private static final long serialVersionUID = 5371691160978884690L;

      src/java.xml/share/classes/org/w3c/dom/ranges/RangeException.java

       public class RangeException extends RuntimeException {
      +    private static final long serialVersionUID = 2427563372446661889L;

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joehw Joe Wang
                Reporter:
                joehw Joe Wang
                Reviewed By:
                Alan Bateman, Lance Andersen
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: