JDK-6746836 : java.net exception classes don't specify serialVersionUID
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-09-10
  • Updated: 2017-05-16
  • Resolved: 2011-05-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b38Fixed
Related Reports
Relates :  
Relates :  
Description
Javadoc doesn't specify the serialVersionUID for serializable classes in the java.net package. The only serializable classes are the Exception classes.

According to RFE 4525039 the serialVersionUID should be included in the Serialized Form generated for each class.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/jsn/jdk/rev/c54ce70a3668
19-09-2008

EVALUATION Explicitly declare private static final long field containing default serialVersionUID for : java.net.BindException java.net.ProtocolException java.net.SocketException java.net.SocketTimeoutException java.net.UnknownHostException java.net.UnknownServiceException java.net.URISyntaxException java.net.ConnectException java.net.HttpRetryException java.net.MalformedURLException java.net.NoRouteToHostException java.net.PortUnreachableException The serialVersionUID of each of the exceptions was determined by serialver, and verified as unchanged since its introduction. There are other sun private Exceptions and classes, e.g. sun.net.ConnectionResetException, that should have their serialVersionUID set. These will also be fixed as part of this CR.
11-09-2008