hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julius Davies (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-41) define non-random serialVersionUID
Date Sun, 11 Feb 2007 15:11:05 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472105
] 

Julius Davies commented on HTTPCORE-41:
---------------------------------------

I think there are situations where a class can change, but the old serialVersionUID is still
fine (if you choose to keep it):

- add/remove methods
- add/remove transient fields
- add non-transient fields where the code can still cope if the field isn't serialized, but
prefers if it is

The automatic solution is important so that the same version of HttpComponents compiled by
different compilers can talk to itself.  But the automatic solution is not quite 100% shiny
perfect.  In the cases above an automatic solution might break installs where people are passing
HttpComponent objects between different versions of HttpComponents.  (But is that really a
usecase we care about?)

(What are the usecases around serialization, anyway?  Are people writing HttpComponents stuff
to disk, and then starting up on a new version?)

> 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: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message