db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6128) Examine Derby classes to determine if we need to add serialVersionUID to any of them
Date Mon, 25 Mar 2013 12:59:15 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13612593#comment-13612593
] 

Rick Hillegas commented on DERBY-6128:
--------------------------------------

Thanks for taking a look at this Dag. Some more conclusions:

ACCIDENT: org.apache.derby.impl.io.DirFile (extends java.io.File)
ACCIDENT: org.apache.derby.impl.io.DirFile4 (extends java.io.File)
OK: org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource40 (only serialized in the scope
of a single JVM)
ACCIDENT: org.apache.derby.security.DatabasePermission (extends java.security.Permission)
OK: org.apache.derby.drda.NetServlet (only serialized in the scope of a single JVM)
OK: org.apache.derby.impl.tools.ij.ijXid (has serialVersionUID)

That leaves the following Externalizable class:

    org.apache.derby.impl.store.raw.data.AllocExtent

It's ok that AllocExtent doesn't have a serialVersionUID. That is because it's only (de)serialized
by AllocPage. AllocPage knows where in the stream to look for an AllocExtent and AllocPage
creates the empty AllocExtent by itself, rather than relying on the Serializable machinery
to do that.  So the serialVersionUID is never checked.

                
> Examine Derby classes to determine if we need to add serialVersionUID to any of them
> ------------------------------------------------------------------------------------
>
>                 Key: DERBY-6128
>                 URL: https://issues.apache.org/jira/browse/DERBY-6128
>             Project: Derby
>          Issue Type: Task
>            Reporter: Rick Hillegas
>         Attachments: SerializableLister.java
>
>
> The discussion on DERBY-6124 has raised the possibility that we may need to add serialVersionUIDs
to some serializable Derby classes. Without the serialVersionUIDs, Derby may encounter deserialization
errors on objects which were serialized by one version of Derby or the JVM and then deserialized
by another version of Derby or the JVM.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message