Skip to content
Permalink
Browse files

close #130: no more JSR305, we recommend SpotBugs internal annotation…

… instead
  • Loading branch information...
KengoTODA committed May 25, 2017
1 parent 533b6be commit 51e941f258f47f1a133c5d052f629ec43c79cb59
@@ -4,6 +4,10 @@ This is the changelog for SpotBugs. This follows [Keep a Changelog v0.3](http://

## Unreleased (2017/??/??)

### Changed

* SpotBugs annotation is recommended instead of JSR305 annotation ([#130](https://github.com/spotbugs/spotbugs/pull/130))

### Fixed

* Fix wrong version in Eclipse Plugin ([#173](https://github.com/spotbugs/spotbugs/pull/173))
@@ -0,0 +1,6 @@
src.excludes=META-INF/MANIFEST-TEMPLATE.MF
bin.includes=META-INF/
jars.compile.order=spotbugs-annotations.jar
src.includes=META-INF/
output.spotbugs-annotations.jar=bin_eclipse/
bin.excludes=META-INF/MANIFEST-TEMPLATE.MF
@@ -33,15 +33,12 @@
*
* When this annotation is applied to a method it applies to the method return
* value.
*
* @deprecated - use {@link javax.annotation.CheckForNull} instead.
**/
@Documented
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE })
@Retention(RetentionPolicy.CLASS)
@javax.annotation.Nonnull(when = When.MAYBE)
@TypeQualifierNickname
@Deprecated
public @interface CheckForNull {

}
@@ -29,13 +29,10 @@
* be checked when invoking the method.
*
* The checker treats this annotation as inherited by overriding methods.
*
* @deprecated - use {@link javax.annotation.CheckReturnValue} instead.
*/
@Documented
@Target({ ElementType.METHOD, ElementType.CONSTRUCTOR })
@Retention(RetentionPolicy.CLASS)
@Deprecated
public @interface CheckReturnValue {

@Deprecated
@@ -41,28 +41,12 @@
* package, and then use @Nullable only on those parameters, methods or fields
* that you want to allow to be null.
*
* @deprecated - Use the JSR305 annotations instead.
* For example, you can use {@link javax.annotation.ParametersAreNonnullByDefault} instead
* of @DefaultAnnotation(NonNull.class) so that method parameters are nonnull by default in the annotated
* element. You can also use {@link javax.annotation.meta.TypeQualifierDefault}
* in general to define your own annotation that specifies a default type qualifier. For example,
* <p><pre><code>
* {@link Nonnegative}
* {@link TypeQualifierDefault}({@link ElementType#PARAMETER})
* public @interface ParametersAreNonnegativeByDefault {}
* </code></pre>
*
* <p>The JSR305 {@link javax.annotation.CheckReturnValue}
* annotation can be applied to a type or package, and it will act as a default for all methods
* in that class or package unless otherwise overridden.
*
* @author William Pugh
*/

@Documented
@Target({ ElementType.TYPE, ElementType.PACKAGE })
@Retention(RetentionPolicy.CLASS)
@Deprecated
public @interface DefaultAnnotation {
Class<? extends Annotation>[] value();

@@ -37,20 +37,12 @@
* package, and then use @Nullable only on those parameters, methods or fields
* that you want to allow to be null.
*
* @deprecated - use the JSR305 annotations instead,
* For example, you can use {@link javax.annotation.ParametersAreNonnullByDefault} instead
* of @DefaultAnnotation(NonNull.class), and {@link javax.annotation.meta.TypeQualifierDefault}
* in general to define a type qualifier default. The JSR305 {@link javax.annotation.CheckReturnValue}
* annotation can be applied to a type or package, and it will act as a default for all methods
* in that class or package unless otherwise overridden.
*
* @author William Pugh
*/

@Documented
@Target({ ElementType.TYPE, ElementType.PACKAGE })
@Retention(RetentionPolicy.CLASS)
@Deprecated
public @interface DefaultAnnotationForParameters {
Class<? extends Annotation>[] value();

@@ -32,15 +32,12 @@
*
* Annotated Fields must only not be null after construction has completed.
* Annotated methods must have non-null return values.
*
* @deprecated - use {@link javax.annotation.Nonnull} instead.
**/
@Documented
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE })
@Retention(RetentionPolicy.CLASS)
@javax.annotation.Nonnull(when = When.ALWAYS)
@TypeQualifierNickname
@Deprecated
public @interface NonNull {

}
@@ -36,15 +36,12 @@
*
* When this annotation is applied to a method it applies to the method return
* value.
*
* @deprecated - use {@link javax.annotation.Nullable} instead.
**/
@Documented
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE })
@Retention(RetentionPolicy.CLASS)
@javax.annotation.Nonnull(when = When.UNKNOWN)
@TypeQualifierNickname
@Deprecated
public @interface Nullable {

}
@@ -35,11 +35,8 @@
* overriding method.
*
* @see edu.umd.cs.findbugs.annotations.When
*
* @deprecated - Use {@link javax.annotation.OverridingMethodsMustInvokeSuper} instead
**/
@Documented
@Deprecated
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.CLASS)
public @interface OverrideMustInvoke {
@@ -1,18 +1,6 @@
/**
* Annotations for FindBugs (mostly deprecated except for {@link edu.umd.cs.findbugs.annotations.SuppressFBWarnings}).
*
* This annotations are mostly deprecated and replaced by JSR 305 annotations
* defined in javax.annotation. The annotations still actively supported are:
* <ul>
* <li> {@link edu.umd.cs.findbugs.annotations.SuppressFBWarnings} for suppressing FindBugs warnings
* <li> Annotations about expected/unexpected warnings in FindBugs regression tests
* <ul>
* <li> {@link edu.umd.cs.findbugs.annotations.ExpectWarning} Warnings expected to be generated
* <li> {@link edu.umd.cs.findbugs.annotations.NoWarning} Warnings that should not be generated
* <li> {@link edu.umd.cs.findbugs.annotations.DesireWarning} Warnings we wish to generated
* <li> {@link edu.umd.cs.findbugs.annotations.DesireNoWarning} Warnings we wish to not generate generated
* </ul></ul>
*
* There are another set of annotations used by an experimental detector for unclosed resources:
* <ul>
* <li>{@link edu.umd.cs.findbugs.annotations.CleanupObligation}
@@ -22,4 +10,3 @@
*/
package edu.umd.cs.findbugs.annotations;

@@ -210,7 +210,6 @@ ant.importBuild('build.xml') { antTargetName ->
'ant-' + antTargetName
}

// TODO : jsr305.jar (really?)
// TODO : generatemanual (we should decide what to do with the manual)
// TODO : generatepdfmanual
// TODO : bugdesc

0 comments on commit 51e941f

Please sign in to comment.
You can’t perform that action at this time.