RFR (JDK10/JAXP) 8176891: Fix lint warnings in JAXP repo: serial

Joe Wang huizhe.wang at oracle.com
Tue Oct 24 01:04:03 UTC 2017


Thanks Lance for the super fast review!!!  I haven't thought I'd check 
back today :-)

On 10/23/17, 5:44 PM, Lance Andersen wrote:
> looks fine Joe
>> On Oct 23, 2017, at 8:37 PM, Joe Wang <huizhe.wang at oracle.com 
>> <mailto:huizhe.wang at oracle.com>> wrote:
>>
>> Hi,
>>
>> Please review a fix that cleans up [serial] warnings by adding the 
>> serialVersionUID. The following tests showed that the 
>> serialVersionUID for the classes in this patch have not changed from 
>> JDK 1.4 to JDK 9:
>>     for each cls in classes that are missing serialVersionUID
>>          for jdk from 1.4 to 9
>>               run:
>>               $jdkversion/bin/serialver $jdkversion/jre/lib/rt.jar cls
>>
>> One exception is javax.xml.namespace.QName. Its serialVersionUID was 
>> different in the standalone JAXP 1.3 before it was integrated into 
>> JDK 1.5. Since JAXP 1.3 was EOLed in 2008 and the serialVersionUID 
>> has been consistent in the JDKs, it is now set with a static value 
>> from the JDK. The original workaround is discarded and the 
>> proprietary property 
>> (com.sun.xml.namespace.QName.useCompatibleSerialVersionUID) retired.
>>
>> Another difference is between JDK 1.5 and 1.6 for class 
>> com.sun.org.apache.xml.internal.utils.URI. Since the UID was changed 
>> from 1.5 to 1.6 and then consistent through JDK 9, the 
>> incompatibility was already absorbed in JDK 1.6. This patch therefore 
>> simply adopts the later.
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8176891
>> webrevs: 
>> http://cr.openjdk.java.net/~joehw/jdk10/8176891/webrev/index.html 
>> <http://cr.openjdk.java.net/%7Ejoehw/jdk10/8176891/webrev/index.html>
>>
>> Thanks,
>> Joe
>>
>> P.S.  Full test results:
>>
>> JDK14
>> Class javax.xml.datatype.DatatypeConfigurationException not found.
>> JDK15
>> javax.xml.datatype.DatatypeConfigurationException:    static final 
>> long serialVersionUID = -1699373159027047238L;
>> JDK16
>> javax.xml.datatype.DatatypeConfigurationException:    static final 
>> long serialVersionUID = -1699373159027047238L;
>> JDK17
>> javax.xml.datatype.DatatypeConfigurationException:    static final 
>> long serialVersionUID = -1699373159027047238L;
>> JDK18
>> javax.xml.datatype.DatatypeConfigurationException:    private static 
>> final long serialVersionUID = -1699373159027047238L;
>> JDK19
>> javax.xml.datatype.DatatypeConfigurationException:    private static 
>> final long serialVersionUID = -1699373159027047238L;
>> JDK14
>> Class javax.xml.namespace.QName not found.
>> JDK15
>> javax.xml.namespace.QName:    static final long serialVersionUID = 
>> -9120448754896609940L;
>> JDK16
>> javax.xml.namespace.QName:    static final long serialVersionUID = 
>> -9120448754896609940L;
>> JDK17
>> javax.xml.namespace.QName:    static final long serialVersionUID = 
>> -9120448754896609940L;
>> JDK18
>> javax.xml.namespace.QName:    private static final long 
>> serialVersionUID = -9120448754896609940L;
>> JDK19
>> javax.xml.namespace.QName:    private static final long 
>> serialVersionUID = -9120448754896609940L;
>> JDK14
>> javax.xml.parsers.ParserConfigurationException:    static final long 
>> serialVersionUID = -3688849216575373917L;
>> JDK15
>> javax.xml.parsers.ParserConfigurationException:    static final long 
>> serialVersionUID = -3688849216575373917L;
>> JDK16
>> javax.xml.parsers.ParserConfigurationException:    static final long 
>> serialVersionUID = -3688849216575373917L;
>> JDK17
>> javax.xml.parsers.ParserConfigurationException:    static final long 
>> serialVersionUID = -3688849216575373917L;
>> JDK18
>> javax.xml.parsers.ParserConfigurationException:    private static 
>> final long serialVersionUID = -3688849216575373917L;
>> JDK19
>> javax.xml.parsers.ParserConfigurationException:    private static 
>> final long serialVersionUID = -3688849216575373917L;
>> JDK14
>> Class javax.xml.stream.XMLStreamException not found.
>> JDK15
>> Class javax.xml.stream.XMLStreamException not found.
>> JDK16
>> javax.xml.stream.XMLStreamException:    static final long 
>> serialVersionUID = 2018819321811497362L;
>> JDK17
>> javax.xml.stream.XMLStreamException:    static final long 
>> serialVersionUID = 2018819321811497362L;
>> JDK18
>> javax.xml.stream.XMLStreamException:    private static final long 
>> serialVersionUID = 2018819321811497362L;
>> JDK19
>> javax.xml.stream.XMLStreamException:    private static final long 
>> serialVersionUID = 2018819321811497362L;
>> JDK14
>> org.w3c.dom.events.EventException:    static final long 
>> serialVersionUID = 242753408332692061L;
>> JDK15
>> org.w3c.dom.events.EventException:    static final long 
>> serialVersionUID = 242753408332692061L;
>> JDK16
>> org.w3c.dom.events.EventException:    static final long 
>> serialVersionUID = 242753408332692061L;
>> JDK17
>> org.w3c.dom.events.EventException:    static final long 
>> serialVersionUID = 242753408332692061L;
>> JDK18
>> org.w3c.dom.events.EventException:    private static final long 
>> serialVersionUID = 242753408332692061L;
>> JDK19
>> org.w3c.dom.events.EventException:    private static final long 
>> serialVersionUID = 242753408332692061L;
>> JDK14
>> Class org.w3c.dom.ls.LSException not found.
>> JDK15
>> org.w3c.dom.ls.LSException:    static final long serialVersionUID = 
>> 5371691160978884690L;
>> JDK16
>> org.w3c.dom.ls.LSException:    static final long serialVersionUID = 
>> 5371691160978884690L;
>> JDK17
>> org.w3c.dom.ls.LSException:    static final long serialVersionUID = 
>> 5371691160978884690L;
>> JDK18
>> org.w3c.dom.ls.LSException:    private static final long 
>> serialVersionUID = 5371691160978884690L;
>> JDK19
>> org.w3c.dom.ls.LSException:    private static final long 
>> serialVersionUID = 5371691160978884690L;
>> JDK14
>> Class org.w3c.dom.ranges.RangeException not found.
>> JDK15
>> org.w3c.dom.ranges.RangeException:    static final long 
>> serialVersionUID = 2427563372446661889L;
>> JDK16
>> org.w3c.dom.ranges.RangeException:    static final long 
>> serialVersionUID = 2427563372446661889L;
>> JDK17
>> org.w3c.dom.ranges.RangeException:    static final long 
>> serialVersionUID = 2427563372446661889L;
>> JDK18
>> org.w3c.dom.ranges.RangeException:    private static final long 
>> serialVersionUID = 2427563372446661889L;
>> JDK19
>> org.w3c.dom.ranges.RangeException:    private static final long 
>> serialVersionUID = 2427563372446661889L;
>> JDK14
>> Class com.sun.org.apache.xalan.internal.utils.ConfigurationError not 
>> found.
>> JDK15
>> com.sun.org.apache.xalan.internal.utils.ConfigurationError:    static 
>> final long serialVersionUID = 749136645488750664L;
>> JDK16
>> com.sun.org.apache.xalan.internal.utils.ConfigurationError:    static 
>> final long serialVersionUID = 749136645488750664L;
>> JDK17
>> com.sun.org.apache.xalan.internal.utils.ConfigurationError:    static 
>> final long serialVersionUID = 749136645488750664L;
>> JDK18
>> com.sun.org.apache.xalan.internal.utils.ConfigurationError: 
>>    private static final long serialVersionUID = 749136645488750664L;
>> JDK19
>> com.sun.org.apache.xalan.internal.utils.ConfigurationError: 
>>    private static final long serialVersionUID = 749136645488750664L;
>> JDK14
>> Class 
>> com.sun.org.apache.xalan.internal.xsltc.compiler.util.InternalError 
>> not found.
>> JDK15
>> Class 
>> com.sun.org.apache.xalan.internal.xsltc.compiler.util.InternalError 
>> not found.
>> JDK16
>> Class 
>> com.sun.org.apache.xalan.internal.xsltc.compiler.util.InternalError 
>> not found.
>> JDK17
>> com.sun.org.apache.xalan.internal.xsltc.compiler.util.InternalError: 
>>    static final long serialVersionUID = -6690855975016554786L;
>> JDK18
>> com.sun.org.apache.xalan.internal.xsltc.compiler.util.InternalError: 
>>    private static final long serialVersionUID = -6690855975016554786L;
>> JDK19
>> com.sun.org.apache.xalan.internal.xsltc.compiler.util.InternalError: 
>>    private static final long serialVersionUID = -6690855975016554786L;
>> JDK14
>> Class 
>> com.sun.org.apache.xalan.internal.xsltc.runtime.InternalRuntimeError 
>> not found.
>> JDK15
>> Class 
>> com.sun.org.apache.xalan.internal.xsltc.runtime.InternalRuntimeError 
>> not found.
>> JDK16
>> Class 
>> com.sun.org.apache.xalan.internal.xsltc.runtime.InternalRuntimeError 
>> not found.
>> JDK17
>> com.sun.org.apache.xalan.internal.xsltc.runtime.InternalRuntimeError: 
>>    static final long serialVersionUID = 2802784919179095307L;
>> JDK18
>> com.sun.org.apache.xalan.internal.xsltc.runtime.InternalRuntimeError: 
>>    private static final long serialVersionUID = 2802784919179095307L;
>> JDK19
>> com.sun.org.apache.xalan.internal.xsltc.runtime.InternalRuntimeError: 
>>    private static final long serialVersionUID = 2802784919179095307L;
>> JDK14
>> Class 
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationDayTimeImpl 
>> not found.
>> JDK15
>> Class 
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationDayTimeImpl 
>> not found.
>> JDK16
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationDayTimeImpl: 
>>    static final long serialVersionUID = 844792794952655204L;
>> JDK17
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationDayTimeImpl: 
>>    static final long serialVersionUID = 844792794952655204L;
>> JDK18
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationDayTimeImpl: 
>>    private static final long serialVersionUID = 844792794952655204L;
>> JDK19
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationDayTimeImpl: 
>>    private static final long serialVersionUID = 844792794952655204L;
>> JDK14
>> Class 
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationYearMonthImpl not 
>> found.
>> JDK15
>> Class 
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationYearMonthImpl not 
>> found.
>> JDK16
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationYearMonthImpl: 
>>    static final long serialVersionUID = -4430140662861507958L;
>> JDK17
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationYearMonthImpl: 
>>    static final long serialVersionUID = -4430140662861507958L;
>> JDK18
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationYearMonthImpl: 
>>    private static final long serialVersionUID = -4430140662861507958L;
>> JDK19
>> com.sun.org.apache.xerces.internal.jaxp.datatype.DurationYearMonthImpl: 
>>    private static final long serialVersionUID = -4430140662861507958L;
>> JDK14
>> Class 
>> com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException not 
>> found.
>> JDK15
>> com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException: 
>>    static final long serialVersionUID = -3201986204982729962L;
>> JDK16
>> com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException: 
>>    static final long serialVersionUID = -3201986204982729962L;
>> JDK17
>> com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException: 
>>    static final long serialVersionUID = -3201986204982729962L;
>> JDK18
>> com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException: 
>>    private static final long serialVersionUID = -3201986204982729962L;
>> JDK19
>> com.sun.org.apache.xerces.internal.jaxp.validation.WrappedSAXException: 
>>    private static final long serialVersionUID = -3201986204982729962L;
>> JDK14
>> Class com.sun.org.apache.xerces.internal.utils.ConfigurationError not 
>> found.
>> JDK15
>> com.sun.org.apache.xerces.internal.utils.ConfigurationError: 
>>    static final long serialVersionUID = 8095902236393167968L;
>> JDK16
>> com.sun.org.apache.xerces.internal.utils.ConfigurationError: 
>>    static final long serialVersionUID = 8095902236393167968L;
>> JDK17
>> com.sun.org.apache.xerces.internal.utils.ConfigurationError: 
>>    static final long serialVersionUID = 8095902236393167968L;
>> JDK18
>> com.sun.org.apache.xerces.internal.utils.ConfigurationError: 
>>    private static final long serialVersionUID = 8095902236393167968L;
>> JDK19
>> com.sun.org.apache.xerces.internal.utils.ConfigurationError: 
>>    private static final long serialVersionUID = 8095902236393167968L;
>> JDK14
>> Class 
>> com.sun.org.apache.xml.internal.serializer.utils.URI.MalformedURIException 
>> not found.
>> JDK15
>> Class 
>> com.sun.org.apache.xml.internal.serializer.utils.URI.MalformedURIException 
>> not found.
>> JDK16
>> com.sun.org.apache.xml.internal.serializer.utils.URI.MalformedURIException: 
>>    static final long serialVersionUID = 4651455286983598951L;
>> JDK17
>> com.sun.org.apache.xml.internal.serializer.utils.URI.MalformedURIException: 
>>    static final long serialVersionUID = 4651455286983598951L;
>> JDK18
>> com.sun.org.apache.xml.internal.serializer.utils.URI.MalformedURIException: 
>>    private static final long serialVersionUID = 4651455286983598951L;
>> JDK19
>> com.sun.org.apache.xml.internal.serializer.utils.URI.MalformedURIException: 
>>    private static final long serialVersionUID = 4651455286983598951L;
>> JDK14
>> Class com.sun.org.apache.xml.internal.utils.URI not found.
>> JDK15
>> com.sun.org.apache.xml.internal.utils.URI:    static final long 
>> serialVersionUID = -4864335621934089776L;
>> JDK16
>> com.sun.org.apache.xml.internal.utils.URI:    static final long 
>> serialVersionUID = 7096266377907081897L;
>> JDK17
>> com.sun.org.apache.xml.internal.utils.URI:    static final long 
>> serialVersionUID = 7096266377907081897L;
>> JDK18
>> com.sun.org.apache.xml.internal.utils.URI:    private static final 
>> long serialVersionUID = 7096266377907081897L;
>> JDK19
>> com.sun.org.apache.xml.internal.utils.URI:    private static final 
>> long serialVersionUID = 7096266377907081897L;
>> JDK14
>> Class com.sun.org.apache.xml.internal.utils.URI.MalformedURIException 
>> not found.
>> JDK15
>> com.sun.org.apache.xml.internal.utils.URI.MalformedURIException: 
>>    static final long serialVersionUID = -8498313684991136829L;
>> JDK16
>> com.sun.org.apache.xml.internal.utils.URI.MalformedURIException: 
>>    static final long serialVersionUID = -8498313684991136829L;
>> JDK17
>> com.sun.org.apache.xml.internal.utils.URI.MalformedURIException: 
>>    static final long serialVersionUID = -8498313684991136829L;
>> JDK18
>> com.sun.org.apache.xml.internal.utils.URI.MalformedURIException: 
>>    private static final long serialVersionUID = -8498313684991136829L;
>> JDK19
>> com.sun.org.apache.xml.internal.utils.URI.MalformedURIException: 
>>    private static final long serialVersionUID = -8498313684991136829L;
>>
>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif><http://oracle.com/us/design/oracle-email-sig-198324.gif>
> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance 
> Andersen| Principal Member of Technical Staff | +1.781.442.2037
> Oracle Java Engineering
> 1 Network Drive
> Burlington, MA 01803
> Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>
>
>
>


More information about the core-libs-dev mailing list