[
https://issues.apache.org/jira/browse/HTTPCORE-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472095
]
Oleg Kalnichevski commented on HTTPCORE-41:
-------------------------------------------
I am -1 to remove serialVersionUIDs. Please see
"If a serializable class does not explicitly declare a serialVersionUID, then
the serialization runtime will calculate a default serialVersionUID value for
that class based on various aspects of the class, as described in the Java(TM)
Object Serialization Specification. However, it is ***strongly*** recommended
that all serializable classes explicitly declare serialVersionUID values, since
the default serialVersionUID computation is highly sensitive to class details
that may vary depending on compiler implementations, and can thus result in
unexpected InvalidClassExceptions during deserialization. Therefore, to
guarantee a consistent serialVersionUID value across different java compiler
implementations, a serializable class must declare an explicit serialVersionUID
value. It is also strongly advised that explicit serialVersionUID declarations
use the private modifier where possible, since such declarations apply only to
the immediately declaring class--serialVersionUID fields are not useful as
inherited members."
As far as I know Eclipse uses serialver to assign those serialVersionUIDs
values. All we have to do is to make sure the value gets updated updated every
time every time we change classes that implement Serializable.
Oleg
> define non-random serialVersionUID
> ----------------------------------
>
> Key: HTTPCORE-41
> URL: https://issues.apache.org/jira/browse/HTTPCORE-41
> Project: HttpComponents Core
> Issue Type: Improvement
> Affects Versions: 4.0-alpha3
> Reporter: Roland Weber
> Assigned To: Roland Weber
> Priority: Trivial
>
> Serializable classes have a serialVersionUID which seems to be an
> auto-generated hash that does not give any indication on how to update it.
> Replace with a definition based on the component version, for example:
> serialVersionUID = 0x400a4L
> for version 4.0, fixlevel 0, alpha 4.
> Let me know what you think,
> Roland
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]