You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2009/09/07 17:29:52 UTC

[jira] Created: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Add serialVersionUID to Serializable classes
--------------------------------------------

                 Key: BEANUTILS-362
                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
             Project: Commons BeanUtils
          Issue Type: Bug
            Reporter: Sebb


The following classes are Serializable, but don't have serialVersionUID defined:

BasicDynaBean
BasicDynaClass 
DynaProperty 
LazyDynaBean 
LazyDynaList 

Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton reopened BEANUTILS-362:
---------------------------------------


> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 1.8.3
>
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton resolved BEANUTILS-362.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.8.3
         Assignee: Niall Pemberton

Fixed, thanks

http://svn.apache.org/viewvc?view=revision&revision=926130

> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 1.8.3
>
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848397#action_12848397 ] 

Sebb commented on BEANUTILS-362:
--------------------------------

Yes, different JVMs can calculate different values for the same class. That is one of the benefits of providing a fixed UID.

See the last paragraph of:
http://java.sun.com/j2se/1.5.0/docs/api/java/io/Serializable.html

However, you could pick a popular JVM and decide to base the UID on that; it will probably work for many users.

What one cannot do is to base the fixed UID on a previous version of the class, unless the current version of the class is serially compatible with the old version.

> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 1.8.3
>
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848220#action_12848220 ] 

Niall Pemberton commented on BEANUTILS-362:
-------------------------------------------

I doubt many (if any) are going to be trying to de-serialize from a previous version - I expect they are usually short lived. Also the implication from this ticket is that different JVM implementations could calculate different values - if thats true then theres little value in setting them to whatever JVM implementation I'm using.

Anyone else got an opinion on whether this is OK to stay or we should just revert the change and close this ticket as WONTFIX?

> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 1.8.3
>
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761176#action_12761176 ] 

Niall Pemberton commented on BEANUTILS-362:
-------------------------------------------

Feel free to fix, otherwise I plan to move this to post-1.8.1 version

> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Brent Worden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brent Worden updated BEANUTILS-362:
-----------------------------------

    Attachment: beanutils-362.diff

Patch adding default serialVersionUID's to the mentioned classes.

> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848187#action_12848187 ] 

Paul Benedict commented on BEANUTILS-362:
-----------------------------------------

For compatibility with previously serialized classes, shouldn't the UIDs be the actual values already calculated by the JVM? I would run the tool against the 1.8.2 versions. Setting them to 1 now can break people.

> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 1.8.3
>
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton updated BEANUTILS-362:
--------------------------------------

    Fix Version/s:     (was: 1.8.3)
                   LATER THAN 1.8.3

The next release is going to be a minor bugfix release so, on thinking about it, seems unwise to risk screwing anyone up - however minor - so I've reverted the change:

http://svn.apache.org/viewvc?view=revision&revision=926529



> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: LATER THAN 1.8.3
>
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BEANUTILS-362) Add serialVersionUID to Serializable classes

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BEANUTILS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848281#action_12848281 ] 

Paul Benedict commented on BEANUTILS-362:
-----------------------------------------

I don't think different JVMs can calculate different values. I am not a JLS expert; I thought it was a standard calculation scheme.

> Add serialVersionUID to Serializable classes
> --------------------------------------------
>
>                 Key: BEANUTILS-362
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-362
>             Project: Commons BeanUtils
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Niall Pemberton
>             Fix For: 1.8.3
>
>         Attachments: beanutils-362.diff
>
>
> The following classes are Serializable, but don't have serialVersionUID defined:
> BasicDynaBean
> BasicDynaClass 
> DynaProperty 
> LazyDynaBean 
> LazyDynaList 
> Performance (and JVM interoperability) would be improved by adding the UIDs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.