You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Henryk Konsek <he...@gmail.com> on 2013/06/05 17:08:02 UTC

Static transients

Hi,

We got almost 500 declarations of "private static final transient"
fields in Camel code base. From what I know static fields are
automatically transient, so this is a redundancy (just like, let's say
marking interface methods as public).

Is there any particular reason we define static fields as transient?

Cheers.

--
Henryk Konsek
http://henryk-konsek.blogspot.com

Re: Static transients

Posted by Henryk Konsek <he...@gmail.com>.
> Fell free to log a JIRA and work on cleaning up this.

Consider it done :) .

--
Henryk Konsek
http://henryk-konsek.blogspot.com

Re: Static transients

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I dont think this is on purpose. I am not aware of us using any other
means of serialization that can detect these static fields and do
their own custom marshal/unmarshal.

Also see on SO
http://stackoverflow.com/questions/4565653/java-static-transient-fields

Fell free to log a JIRA and work on cleaning up this.



On Wed, Jun 5, 2013 at 5:08 PM, Henryk Konsek <he...@gmail.com> wrote:
> Hi,
>
> We got almost 500 declarations of "private static final transient"
> fields in Camel code base. From what I know static fields are
> automatically transient, so this is a redundancy (just like, let's say
> marking interface methods as public).
>
> Is there any particular reason we define static fields as transient?
>
> Cheers.
>
> --
> Henryk Konsek
> http://henryk-konsek.blogspot.com



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen