Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Ray Nicholus
I'd hate to use such an annotation on every single instance. Instead, I'd love to filter out warnings based on annotation (in this case, Inject), but FB doesn't allow this in their filter files. On Fri, Jun 8, 2012 at 11:39 AM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri,

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Ray Nicholus
can contain rules that you wish to exclude from the > findbugs report. > > http://mojo.codehaus.org/findbugs-maven-plugin/usage.html > http://findbugs.sourceforge.net/manual/filter.html > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Jun 2012 14:23:16 -0300, Richard Frovarp wrote: It can't. @SuppressWarnings has a RentionPolicy of SOURCE, so doesn't survive past the compiler. Thanks for the information. I haven't noticed it yet. -- Thiago H. de Paula Figueiredo -

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Richard Frovarp
On 06/08/2012 11:39 AM, Thiago H de Paula Figueiredo wrote: On Fri, 08 Jun 2012 13:20:24 -0300, Richard Frovarp wrote: Which version of FindBugs are you using? I'm using FindBugs 1.x via Sonar / Maven and I don't have any of those warnings being thrown. I've had to get rid of a few of the rule

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Thiago H de Paula Figueiredo
What's a global field? As far as I know, Java has no such thing, just fields. On Fri, 08 Jun 2012 12:32:20 -0300, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so, have you managed to find a way to suppress the NPE warnings when dereferencing an injected field? Fr

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Thiago H de Paula Figueiredo
On Fri, 08 Jun 2012 13:20:24 -0300, Richard Frovarp wrote: Which version of FindBugs are you using? I'm using FindBugs 1.x via Sonar / Maven and I don't have any of those warnings being thrown. I've had to get rid of a few of the rules regarding Unread field and Unused field as @Property

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Richard Frovarp
On 06/08/2012 10:32 AM, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so, have you managed to find a way to suppress the NPE warnings when dereferencing an injected field? This doesn't appear to be possible, which makes FB useless in a T5 app, for the most part. It's not cl

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Lance Java
usage.html http://findbugs.sourceforge.net/manual/filter.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/FindBugs-and-the-Inject-annotation-on-global-fields-tp5713724p5713727.html Sent from the Tapestry - User mailing list archiv

Re: FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Martin Strand
I use constructor injection for all services, so Findbugs works as expected there. But I've had to disable Findbugs for page/component classes since there is so much magic going on there. On Fri, 08 Jun 2012 17:32:20 +0200, Ray Nicholus wrote: Is anyone using FindBugs in a T5 project? If so

FindBugs and the @Inject annotation on global fields

2012-06-08 Thread Ray Nicholus
Is anyone using FindBugs in a T5 project? If so, have you managed to find a way to suppress the NPE warnings when dereferencing an injected field? This doesn't appear to be possible, which makes FB useless in a T5 app, for the most part. It's not clear that any other static analysis tools provid