felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: Service Reference as Mutable Servlet Field
Date Tue, 02 Nov 2010 13:59:56 GMT

Am Dienstag, den 02.11.2010, 09:34 -0400 schrieb Carl Hall: 
> In running FindBugs on our project, it fusses about having mutable servlet
> fields [1].  These fields are server @Reference fields that are managed by
> OSGi and don't carry any state.  Should we be concerned about this "bug"
> from FindBugs?

I would say, that this is a situation where OSGi and general Web Apps
are quite different: In fact, the Servlet instance will be singleton and
the field will probably not change due to normal Servlet operation.

So, yes, I would say in this special circumstance the warning can
certainly be ignored IMHO.

> Another suggestion made by FindBugs is to mark these fields as 'transient'.
>  Is this common practice for service references in a servlet?

Cannot tell, but I would assume that this "bug" can be marked to ignore
in this situation.


> Thanks,
> Carl
> 1
> http://findbugs.sourceforge.net/bugDescriptions.html#MSF_MUTABLE_SERVLET_FIELD

To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

View raw message