You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <ji...@apache.org> on 2006/09/16 10:54:22 UTC

[jira] Created: (VELOCITY-458) InternalContextBase defines non-serializable non-transient fields

InternalContextBase defines non-serializable non-transient fields
-----------------------------------------------------------------

                 Key: VELOCITY-458
                 URL: http://issues.apache.org/jira/browse/VELOCITY-458
             Project: Velocity
          Issue Type: Bug
          Components: Engine
    Affects Versions: 1.5 beta1
            Reporter: Henning Schmiedehausen
             Fix For: 1.5


According to Findbugs, org.apache.velocity.context.InternalContextBase defines currentResource and eventCartridge as non-serializable, non-transient  in a serializable class.

Possible solutions:

a) make Resource and EventCartridge serializable (might drag a large number of classes along)

b) remove Serializable from InternalContextBase (does the Context get serialized somewhere? Is it needed for e.g. Web Applications?)

c) make the fields transient, losing their contents after serialization / de-serialization.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


[jira] Resolved: (VELOCITY-458) InternalContextBase defines non-serializable non-transient fields

Posted by "Henning Schmiedehausen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/VELOCITY-458?page=all ]

Henning Schmiedehausen resolved VELOCITY-458.
---------------------------------------------

    Resolution: Fixed

Removed Serializable. 

> InternalContextBase defines non-serializable non-transient fields
> -----------------------------------------------------------------
>
>                 Key: VELOCITY-458
>                 URL: http://issues.apache.org/jira/browse/VELOCITY-458
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5 beta1
>            Reporter: Henning Schmiedehausen
>             Fix For: 1.5
>
>
> According to Findbugs, org.apache.velocity.context.InternalContextBase defines currentResource and eventCartridge as non-serializable, non-transient  in a serializable class.
> Possible solutions:
> a) make Resource and EventCartridge serializable (might drag a large number of classes along)
> b) remove Serializable from InternalContextBase (does the Context get serialized somewhere? Is it needed for e.g. Web Applications?)
> c) make the fields transient, losing their contents after serialization / de-serialization.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


[jira] Commented: (VELOCITY-458) InternalContextBase defines non-serializable non-transient fields

Posted by "Will Glass-Husain (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/VELOCITY-458?page=comments#action_12435242 ] 
            
Will Glass-Husain commented on VELOCITY-458:
--------------------------------------------

so what's the current behavior?  If someone serializes a VelocityContext object does it throw an exception?

Hard to see what's right here.  Option c is terrible -- it's a hidden change to the context state.

My preference is

(a) make Resource/Event Cartridge serializable  (recognizing this is a pain)

(b) remove Serializable (since it doesn't work anyway)

> InternalContextBase defines non-serializable non-transient fields
> -----------------------------------------------------------------
>
>                 Key: VELOCITY-458
>                 URL: http://issues.apache.org/jira/browse/VELOCITY-458
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5 beta1
>            Reporter: Henning Schmiedehausen
>             Fix For: 1.5
>
>
> According to Findbugs, org.apache.velocity.context.InternalContextBase defines currentResource and eventCartridge as non-serializable, non-transient  in a serializable class.
> Possible solutions:
> a) make Resource and EventCartridge serializable (might drag a large number of classes along)
> b) remove Serializable from InternalContextBase (does the Context get serialized somewhere? Is it needed for e.g. Web Applications?)
> c) make the fields transient, losing their contents after serialization / de-serialization.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


[jira] Closed: (VELOCITY-458) InternalContextBase defines non-serializable non-transient fields

Posted by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org>.
     [ https://issues.apache.org/jira/browse/VELOCITY-458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henning Schmiedehausen closed VELOCITY-458.
-------------------------------------------


> InternalContextBase defines non-serializable non-transient fields
> -----------------------------------------------------------------
>
>                 Key: VELOCITY-458
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-458
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 1.5 beta1
>            Reporter: Henning Schmiedehausen
>             Fix For: 1.5
>
>
> According to Findbugs, org.apache.velocity.context.InternalContextBase defines currentResource and eventCartridge as non-serializable, non-transient  in a serializable class.
> Possible solutions:
> a) make Resource and EventCartridge serializable (might drag a large number of classes along)
> b) remove Serializable from InternalContextBase (does the Context get serialized somewhere? Is it needed for e.g. Web Applications?)
> c) make the fields transient, losing their contents after serialization / de-serialization.

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