src/javax/xml/namespace/QName.java

Print this page




  66  * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
  67  *   XML Schema Part2: Datatypes specification</a>
  68  * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  69  *   Namespaces in XML</a>
  70  * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">
  71  *   Namespaces in XML Errata</a>
  72  * @since 1.5
  73  */
  74 
  75 public class QName implements Serializable {
  76 
  77     /**
  78      * <p>Stream Unique Identifier.</p>
  79      *
  80      * <p>Due to a historical defect, QName was released with multiple
  81      * serialVersionUID values even though its serialization was the
  82      * same.</p>
  83      *
  84      * <p>To workaround this issue, serialVersionUID is set with either
  85      * a default value or a compatibility value.  To use the
  86      * compatiblity value, set the system property:</p>
  87      *
  88      * <code>com.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0</code>
  89      *
  90      * <p>This workaround was inspired by classes in the javax.management
  91      * package, e.g. ObjectName, etc.
  92      * See CR6267224 for original defect report.</p>
  93      */
  94     private static final long serialVersionUID;
  95     /**
  96      * <p>Default <code>serialVersionUID</code> value.</p>
  97      */
  98     private static final long defaultSerialVersionUID = -9120448754896609940L;
  99     /**
 100      * <p>Compatibility <code>serialVersionUID</code> value.</p>
 101      */
 102     private static final long compatibleSerialVersionUID = 4418622981026545151L;
 103     /**
 104      * <p>Flag to use default or campatible serialVersionUID.</p>
 105      */
 106     private static boolean useDefaultSerialVersionUID = true;




  66  * @see <a href="http://www.w3.org/TR/xmlschema-2/#QName">
  67  *   XML Schema Part2: Datatypes specification</a>
  68  * @see <a href="http://www.w3.org/TR/REC-xml-names/#ns-qualnames">
  69  *   Namespaces in XML</a>
  70  * @see <a href="http://www.w3.org/XML/xml-names-19990114-errata">
  71  *   Namespaces in XML Errata</a>
  72  * @since 1.5
  73  */
  74 
  75 public class QName implements Serializable {
  76 
  77     /**
  78      * <p>Stream Unique Identifier.</p>
  79      *
  80      * <p>Due to a historical defect, QName was released with multiple
  81      * serialVersionUID values even though its serialization was the
  82      * same.</p>
  83      *
  84      * <p>To workaround this issue, serialVersionUID is set with either
  85      * a default value or a compatibility value.  To use the
  86      * compatibility value, set the system property:</p>
  87      *
  88      * <code>com.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0</code>
  89      *
  90      * <p>This workaround was inspired by classes in the javax.management
  91      * package, e.g. ObjectName, etc.
  92      * See CR6267224 for original defect report.</p>
  93      */
  94     private static final long serialVersionUID;
  95     /**
  96      * <p>Default <code>serialVersionUID</code> value.</p>
  97      */
  98     private static final long defaultSerialVersionUID = -9120448754896609940L;
  99     /**
 100      * <p>Compatibility <code>serialVersionUID</code> value.</p>
 101      */
 102     private static final long compatibleSerialVersionUID = 4418622981026545151L;
 103     /**
 104      * <p>Flag to use default or campatible serialVersionUID.</p>
 105      */
 106     private static boolean useDefaultSerialVersionUID = true;