You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kristian Rosenvold <kr...@gmail.com> on 2014/09/22 18:10:53 UTC

Jsr305, Take 2

Some time ago, we discussed using the JSR305 annotations. At the time we
discussed @Nonnull and @Nullable, and it turned out that those two
annotations are "named based" in most analysis-tools; you can make your own
org.apache.maven.annotations.Nonnull/Nullable and have a reasonable chance
of having tools pick them up. Both findbugs and IntelliJ support this
approach. We sort-of concluded that this would be the optimal approach, and
since then we promptly did nothing about it :)

I'm very happy that we didn't do anything about it, since I'd now like to
re-propose that we actually use

Re: Jsr305, Take 2

Posted by Jeff Jensen <je...@upstairstechnology.com>.
On Tue, Sep 23, 2014 at 11:05 PM, Hervé BOUTEMY <he...@free.fr>
wrote:

> Le lundi 22 septembre 2014 18:14:52 Kristian Rosenvold a écrit :
> >  <dependency>
> >           <groupId>com.google.code.findbugs</groupId>
> >           <artifactId>jsr305</artifactId>
> >           <version>3.0.0</version>
> >           <scope>provided</scope>
> >     </dependency>
> >
> > The reason for this is that the findbugs project has been evolving
> > these annotations at a pace, and I would now also like to use
> > @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
> > @WillClose and @WillNotClose.
> >
> > (CheckReturnValue makes it an error NOT to check the return value,
> > which is good for immutable classes...)
> >
> > I think these annotations are particularly valuable in shared code
> > (maven-shared and all of plexus).
> +1
>
> and with provided scope, I don't see any drawback
> version 1.3.7 was LGPL (as stated in the POM), but version 3.0.0 is AL, so
> I
> don't see any problem
>
> Regards,
>
> Hervé
>
> >
> > Kristian
> >
> > 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold
> <kr...@gmail.com>:
> > > Some time ago, we discussed using the JSR305 annotations. At the time
> we
> > > discussed @Nonnull and @Nullable, and it turned out that those two
> > > annotations are "named based" in most analysis-tools; you can make your
> > > own
> > > org.apache.maven.annotations.Nonnull/Nullable and have a reasonable
> chance
> > > of having tools pick them up. Both findbugs and IntelliJ support this
> > > approach. We sort-of concluded that this would be the optimal approach,
> > > and
> > > since then we promptly did nothing about it :)
> > >
> > > I'm very happy that we didn't do anything about it, since I'd now like
> to
> > > re-propose that we actually use
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Jsr305, Take 2

Posted by Hervé BOUTEMY <he...@free.fr>.
Le lundi 22 septembre 2014 18:14:52 Kristian Rosenvold a écrit :
>  <dependency>
>           <groupId>com.google.code.findbugs</groupId>
>           <artifactId>jsr305</artifactId>
>           <version>3.0.0</version>
>           <scope>provided</scope>
>     </dependency>
> 
> The reason for this is that the findbugs project has been evolving
> these annotations at a pace, and I would now also like to use
> @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
> @WillClose and @WillNotClose.
> 
> (CheckReturnValue makes it an error NOT to check the return value,
> which is good for immutable classes...)
> 
> I think these annotations are particularly valuable in shared code
> (maven-shared and all of plexus).
+1

and with provided scope, I don't see any drawback
version 1.3.7 was LGPL (as stated in the POM), but version 3.0.0 is AL, so I 
don't see any problem

Regards,

Hervé

> 
> Kristian
> 
> 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold 
<kr...@gmail.com>:
> > Some time ago, we discussed using the JSR305 annotations. At the time we
> > discussed @Nonnull and @Nullable, and it turned out that those two
> > annotations are "named based" in most analysis-tools; you can make your
> > own
> > org.apache.maven.annotations.Nonnull/Nullable and have a reasonable chance
> > of having tools pick them up. Both findbugs and IntelliJ support this
> > approach. We sort-of concluded that this would be the optimal approach,
> > and
> > since then we promptly did nothing about it :)
> > 
> > I'm very happy that we didn't do anything about it, since I'd now like to
> > re-propose that we actually use
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org


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


Re: Jsr305, Take 2

Posted by Kristian Rosenvold <kr...@gmail.com>.
And I don't really think there's much point in annotating maven core
with these values, I'm not sure there's enough guaranteed consistency
anywhere to actually make it worthwhile. it seems like annotating
shared code and libraries is the most useful.

Kristian


2014-09-22 18:33 GMT+02:00 Kristian Rosenvold <kr...@gmail.com>:
> And, included with a "provided" scope we're not forcing these
> annotations on anyone. But they do give marvelous IDE support :)
>
> Kristian
>
>
> 2014-09-22 18:32 GMT+02:00 Kristian Rosenvold <kr...@gmail.com>:
>> Yeah, it seems to me like they just abandoned the JCP but kept the
>> name. So "dormant" refers to the JCP project, not the actual findbugs
>> module we're talking about here, which has a decent release frequency.
>>
>> Kristian
>>
>>
>> 2014-09-22 18:19 GMT+02:00 Paul Benedict <pb...@apache.org>:
>>> Just so everyone knows, JSR 305 is in "dormant" status. Whatever
>>> annotations you use aren't "standard" annotations since the JSR never
>>> completed.
>>>
>>>
>>> Cheers,
>>> Paul
>>>
>>> On Mon, Sep 22, 2014 at 11:14 AM, Kristian Rosenvold <
>>> kristian.rosenvold@gmail.com> wrote:
>>>
>>>>  <dependency>
>>>>           <groupId>com.google.code.findbugs</groupId>
>>>>           <artifactId>jsr305</artifactId>
>>>>           <version>3.0.0</version>
>>>>           <scope>provided</scope>
>>>>     </dependency>
>>>>
>>>> The reason for this is that the findbugs project has been evolving
>>>> these annotations at a pace, and I would now also like to use
>>>> @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
>>>> @WillClose and @WillNotClose.
>>>>
>>>> (CheckReturnValue makes it an error NOT to check the return value,
>>>> which is good for immutable classes...)
>>>>
>>>> I think these annotations are particularly valuable in shared code
>>>> (maven-shared and all of plexus).
>>>>
>>>> Kristian
>>>>
>>>>
>>>> 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold <
>>>> kristian.rosenvold@gmail.com>:
>>>> > Some time ago, we discussed using the JSR305 annotations. At the time we
>>>> > discussed @Nonnull and @Nullable, and it turned out that those two
>>>> > annotations are "named based" in most analysis-tools; you can make your
>>>> own
>>>> > org.apache.maven.annotations.Nonnull/Nullable and have a reasonable
>>>> chance
>>>> > of having tools pick them up. Both findbugs and IntelliJ support this
>>>> > approach. We sort-of concluded that this would be the optimal approach,
>>>> and
>>>> > since then we promptly did nothing about it :)
>>>> >
>>>> > I'm very happy that we didn't do anything about it, since I'd now like to
>>>> > re-propose that we actually use
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>>
>>>>

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


Re: Jsr305, Take 2

Posted by Kristian Rosenvold <kr...@gmail.com>.
And, included with a "provided" scope we're not forcing these
annotations on anyone. But they do give marvelous IDE support :)

Kristian


2014-09-22 18:32 GMT+02:00 Kristian Rosenvold <kr...@gmail.com>:
> Yeah, it seems to me like they just abandoned the JCP but kept the
> name. So "dormant" refers to the JCP project, not the actual findbugs
> module we're talking about here, which has a decent release frequency.
>
> Kristian
>
>
> 2014-09-22 18:19 GMT+02:00 Paul Benedict <pb...@apache.org>:
>> Just so everyone knows, JSR 305 is in "dormant" status. Whatever
>> annotations you use aren't "standard" annotations since the JSR never
>> completed.
>>
>>
>> Cheers,
>> Paul
>>
>> On Mon, Sep 22, 2014 at 11:14 AM, Kristian Rosenvold <
>> kristian.rosenvold@gmail.com> wrote:
>>
>>>  <dependency>
>>>           <groupId>com.google.code.findbugs</groupId>
>>>           <artifactId>jsr305</artifactId>
>>>           <version>3.0.0</version>
>>>           <scope>provided</scope>
>>>     </dependency>
>>>
>>> The reason for this is that the findbugs project has been evolving
>>> these annotations at a pace, and I would now also like to use
>>> @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
>>> @WillClose and @WillNotClose.
>>>
>>> (CheckReturnValue makes it an error NOT to check the return value,
>>> which is good for immutable classes...)
>>>
>>> I think these annotations are particularly valuable in shared code
>>> (maven-shared and all of plexus).
>>>
>>> Kristian
>>>
>>>
>>> 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold <
>>> kristian.rosenvold@gmail.com>:
>>> > Some time ago, we discussed using the JSR305 annotations. At the time we
>>> > discussed @Nonnull and @Nullable, and it turned out that those two
>>> > annotations are "named based" in most analysis-tools; you can make your
>>> own
>>> > org.apache.maven.annotations.Nonnull/Nullable and have a reasonable
>>> chance
>>> > of having tools pick them up. Both findbugs and IntelliJ support this
>>> > approach. We sort-of concluded that this would be the optimal approach,
>>> and
>>> > since then we promptly did nothing about it :)
>>> >
>>> > I'm very happy that we didn't do anything about it, since I'd now like to
>>> > re-propose that we actually use
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>

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


Re: Jsr305, Take 2

Posted by Kristian Rosenvold <kr...@gmail.com>.
Yeah, it seems to me like they just abandoned the JCP but kept the
name. So "dormant" refers to the JCP project, not the actual findbugs
module we're talking about here, which has a decent release frequency.

Kristian


2014-09-22 18:19 GMT+02:00 Paul Benedict <pb...@apache.org>:
> Just so everyone knows, JSR 305 is in "dormant" status. Whatever
> annotations you use aren't "standard" annotations since the JSR never
> completed.
>
>
> Cheers,
> Paul
>
> On Mon, Sep 22, 2014 at 11:14 AM, Kristian Rosenvold <
> kristian.rosenvold@gmail.com> wrote:
>
>>  <dependency>
>>           <groupId>com.google.code.findbugs</groupId>
>>           <artifactId>jsr305</artifactId>
>>           <version>3.0.0</version>
>>           <scope>provided</scope>
>>     </dependency>
>>
>> The reason for this is that the findbugs project has been evolving
>> these annotations at a pace, and I would now also like to use
>> @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
>> @WillClose and @WillNotClose.
>>
>> (CheckReturnValue makes it an error NOT to check the return value,
>> which is good for immutable classes...)
>>
>> I think these annotations are particularly valuable in shared code
>> (maven-shared and all of plexus).
>>
>> Kristian
>>
>>
>> 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold <
>> kristian.rosenvold@gmail.com>:
>> > Some time ago, we discussed using the JSR305 annotations. At the time we
>> > discussed @Nonnull and @Nullable, and it turned out that those two
>> > annotations are "named based" in most analysis-tools; you can make your
>> own
>> > org.apache.maven.annotations.Nonnull/Nullable and have a reasonable
>> chance
>> > of having tools pick them up. Both findbugs and IntelliJ support this
>> > approach. We sort-of concluded that this would be the optimal approach,
>> and
>> > since then we promptly did nothing about it :)
>> >
>> > I'm very happy that we didn't do anything about it, since I'd now like to
>> > re-propose that we actually use
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>

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


Re: Jsr305, Take 2

Posted by Paul Benedict <pb...@apache.org>.
Just so everyone knows, JSR 305 is in "dormant" status. Whatever
annotations you use aren't "standard" annotations since the JSR never
completed.


Cheers,
Paul

On Mon, Sep 22, 2014 at 11:14 AM, Kristian Rosenvold <
kristian.rosenvold@gmail.com> wrote:

>  <dependency>
>           <groupId>com.google.code.findbugs</groupId>
>           <artifactId>jsr305</artifactId>
>           <version>3.0.0</version>
>           <scope>provided</scope>
>     </dependency>
>
> The reason for this is that the findbugs project has been evolving
> these annotations at a pace, and I would now also like to use
> @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
> @WillClose and @WillNotClose.
>
> (CheckReturnValue makes it an error NOT to check the return value,
> which is good for immutable classes...)
>
> I think these annotations are particularly valuable in shared code
> (maven-shared and all of plexus).
>
> Kristian
>
>
> 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold <
> kristian.rosenvold@gmail.com>:
> > Some time ago, we discussed using the JSR305 annotations. At the time we
> > discussed @Nonnull and @Nullable, and it turned out that those two
> > annotations are "named based" in most analysis-tools; you can make your
> own
> > org.apache.maven.annotations.Nonnull/Nullable and have a reasonable
> chance
> > of having tools pick them up. Both findbugs and IntelliJ support this
> > approach. We sort-of concluded that this would be the optimal approach,
> and
> > since then we promptly did nothing about it :)
> >
> > I'm very happy that we didn't do anything about it, since I'd now like to
> > re-propose that we actually use
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Jsr305, Take 2

Posted by Kristian Rosenvold <kr...@gmail.com>.
While there is a @Tainted annotation, I could not find any GPL stuff
:) Seems straight BSD to me.

(http://jsr-305.googlecode.com/svn/trunk)

Kristian



2014-09-22 18:55 GMT+02:00 Igor Fedorenko <ig...@ifedorenko.com>:
> I haven't checked version 3.0.0, but version 1.3.9 used to have sources
> with GPL headers and was rejected by Eclipse IP team. Probably worth to
> double-check this has been cleaned up.
>
> --
> Regards,
> Igor
>
>
> On 2014-09-22, 12:14, Kristian Rosenvold wrote:
>>
>>   <dependency>
>>            <groupId>com.google.code.findbugs</groupId>
>>            <artifactId>jsr305</artifactId>
>>            <version>3.0.0</version>
>>            <scope>provided</scope>
>>      </dependency>
>>
>> The reason for this is that the findbugs project has been evolving
>> these annotations at a pace, and I would now also like to use
>> @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
>> @WillClose and @WillNotClose.
>>
>> (CheckReturnValue makes it an error NOT to check the return value,
>> which is good for immutable classes...)
>>
>> I think these annotations are particularly valuable in shared code
>> (maven-shared and all of plexus).
>>
>> Kristian
>>
>>
>> 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold
>> <kr...@gmail.com>:
>>>
>>> Some time ago, we discussed using the JSR305 annotations. At the time we
>>> discussed @Nonnull and @Nullable, and it turned out that those two
>>> annotations are "named based" in most analysis-tools; you can make your
>>> own
>>> org.apache.maven.annotations.Nonnull/Nullable and have a reasonable
>>> chance
>>> of having tools pick them up. Both findbugs and IntelliJ support this
>>> approach. We sort-of concluded that this would be the optimal approach,
>>> and
>>> since then we promptly did nothing about it :)
>>>
>>> I'm very happy that we didn't do anything about it, since I'd now like to
>>> re-propose that we actually use
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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


Re: Jsr305, Take 2

Posted by Igor Fedorenko <ig...@ifedorenko.com>.
I haven't checked version 3.0.0, but version 1.3.9 used to have sources
with GPL headers and was rejected by Eclipse IP team. Probably worth to
double-check this has been cleaned up.

--
Regards,
Igor

On 2014-09-22, 12:14, Kristian Rosenvold wrote:
>   <dependency>
>            <groupId>com.google.code.findbugs</groupId>
>            <artifactId>jsr305</artifactId>
>            <version>3.0.0</version>
>            <scope>provided</scope>
>      </dependency>
>
> The reason for this is that the findbugs project has been evolving
> these annotations at a pace, and I would now also like to use
> @CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
> @WillClose and @WillNotClose.
>
> (CheckReturnValue makes it an error NOT to check the return value,
> which is good for immutable classes...)
>
> I think these annotations are particularly valuable in shared code
> (maven-shared and all of plexus).
>
> Kristian
>
>
> 2014-09-22 18:10 GMT+02:00 Kristian Rosenvold <kr...@gmail.com>:
>> Some time ago, we discussed using the JSR305 annotations. At the time we
>> discussed @Nonnull and @Nullable, and it turned out that those two
>> annotations are "named based" in most analysis-tools; you can make your own
>> org.apache.maven.annotations.Nonnull/Nullable and have a reasonable chance
>> of having tools pick them up. Both findbugs and IntelliJ support this
>> approach. We sort-of concluded that this would be the optimal approach, and
>> since then we promptly did nothing about it :)
>>
>> I'm very happy that we didn't do anything about it, since I'd now like to
>> re-propose that we actually use
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

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


Re: Jsr305, Take 2

Posted by Kristian Rosenvold <kr...@gmail.com>.
 <dependency>
          <groupId>com.google.code.findbugs</groupId>
          <artifactId>jsr305</artifactId>
          <version>3.0.0</version>
          <scope>provided</scope>
    </dependency>

The reason for this is that the findbugs project has been evolving
these annotations at a pace, and I would now also like to use
@CheckForNull, @CheckReturnValue, @OverridingMethodsMustInvokeSuper,
@WillClose and @WillNotClose.

(CheckReturnValue makes it an error NOT to check the return value,
which is good for immutable classes...)

I think these annotations are particularly valuable in shared code
(maven-shared and all of plexus).

Kristian


2014-09-22 18:10 GMT+02:00 Kristian Rosenvold <kr...@gmail.com>:
> Some time ago, we discussed using the JSR305 annotations. At the time we
> discussed @Nonnull and @Nullable, and it turned out that those two
> annotations are "named based" in most analysis-tools; you can make your own
> org.apache.maven.annotations.Nonnull/Nullable and have a reasonable chance
> of having tools pick them up. Both findbugs and IntelliJ support this
> approach. We sort-of concluded that this would be the optimal approach, and
> since then we promptly did nothing about it :)
>
> I'm very happy that we didn't do anything about it, since I'd now like to
> re-propose that we actually use

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