cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: svn commit: r124693 - in cocoon/branches/BRANCH_2_1_X/src: blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/configuration blocks/axis/java/org/apache/cocoon/components/axis/providers blocks/forms/java/org/apache/cocoon/forms/event blocks/forms/java/org/apache/cocoon/forms/flow/javascript blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2 blocks/forms/java/org/apache/cocoon/forms/formmodel blocks/paranoid/java/org/apache/cocoon/servlet blocks/scratchpad/java/org/apache/cocoon/components/flow/javascript/fom blocks/scratchpad/java/org/apache/cocoon/generation blocks/web3/java/org/apache/cocoon/components/web3/impl java/org/apache/cocoon/components/flow/javascript/fom java/org/apache/cocoon/servlet
Date Wed, 12 Jan 2005 14:14:03 GMT
antonio@apache.org wrote:
> Author: antonio
> Date: Sat Jan  8 16:35:26 2005
> New Revision: 124693

Hi Antonio,

What logic have you used to select classes for adding serialVersionUID?


> URL: http://svn.apache.org/viewcvs?view=rev&rev=124693
> Log:
> Add serialVersionUID
> Modified:
>    cocoon/branches/BRANCH_2_1_X/src/blocks/authentication-fw/java/org/apache/cocoon/webapps/authentication/configuration/HandlerConfiguration.java
>    cocoon/branches/BRANCH_2_1_X/src/blocks/axis/java/org/apache/cocoon/components/axis/providers/AvalonProvider.java
>    cocoon/branches/BRANCH_2_1_X/src/blocks/scratchpad/java/org/apache/cocoon/generation/RequestParameterGenerator.java
>    cocoon/branches/BRANCH_2_1_X/src/blocks/web3/java/org/apache/cocoon/components/web3/impl/Web3Properties.java

Even though above classes are Serializable, none of those classes have 
witeObject / readObject methods. Next change to any of those classess will cause 
exceptions during serialization, if somebody to try it. serialVersionUID should 
be removed. The only situation when it must be added back is when there is a 
conscious effort to make different versions of the class to have compatible disk 
format.


>    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/ScriptableWidget.java
>    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/flow/javascript/v2/ScriptableWidget.java

These classes, even though super class is marked as Serializable, have non 
transient member storing instance(s) of the non serializable classes, so 
serialVersionUID here has no sense and should be removed. Any attempt to 
serialize / deserialize these objects will cause system to fail.


>    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/event/ProcessingPhase.java
>    cocoon/branches/BRANCH_2_1_X/src/blocks/forms/java/org/apache/cocoon/forms/formmodel/WidgetState.java

Here serialVersionUID makes no harm, so probably it can be left in.


>    cocoon/branches/BRANCH_2_1_X/src/blocks/paranoid/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
>    cocoon/branches/BRANCH_2_1_X/src/blocks/scratchpad/java/org/apache/cocoon/components/flow/javascript/fom/AO_FOM_Cocoon.java
>    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/components/flow/javascript/fom/FOM_Cocoon.java
>    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/servlet/CocoonServlet.java

Same situation as with ScriptableWidget. Nothing good will happen after 
serialization. Please revert.


Thanks,
Vadim

Mime
View raw message