Off Topic - Serialization, Guice and FindBugs

2009-01-26 Thread Steve Flasby

Chaps, I have installed FindBugs and it complains about code fragments
like:

@Inject
private PortfolioService mPortfolioService;

in my Page classes, telling me:
[M B Se] Non-transient non-serializable instance field in serializable 
class [SE_BAD_FIELD]


The value is injected by Guice and, as far as I understand, ends up
being a serializable proxy. I like to have no warnings in my code
so I'd like to do something about this.


So, 2 question:
1 - am I right in thinking that the injected proxy is serializable?
2 - is there something I can do to prevent the warning?

Hope someone can help.

Cheers - Steve

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Off Topic - Serialization, Guice and FindBugs

2009-01-26 Thread Martin Grigorov
El lun, 26-01-2009 a las 09:56 +0100, Steve Flasby escribió:
 Chaps, I have installed FindBugs and it complains about code fragments
 like:
 
   @Inject
   private PortfolioService mPortfolioService;
 
 in my Page classes, telling me:
 [M B Se] Non-transient non-serializable instance field in serializable 
 class [SE_BAD_FIELD]
 
 The value is injected by Guice and, as far as I understand, ends up
 being a serializable proxy. I like to have no warnings in my code
 so I'd like to do something about this.
 
 
 So, 2 question:
 1 - am I right in thinking that the injected proxy is serializable?
Correct!
 2 - is there something I can do to prevent the warning?
FindBugs provides meanings how to disable/modify its checks. 
So you could extend this particular check and if the field is annotated
then don't report warning.
Read their docs for more info. 
 
 Hope someone can help.
 
 Cheers - Steve
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org