blob: e61e554d06c2a1c2d36a549ed1284d700c17ebe5 [file]
package foo;
import javax.annotation.*;
import javax.annotation.meta.TypeQualifierDefault;
import javax.annotation.meta.When;
import java.lang.annotation.ElementType;
@Nonnull
@TypeQualifierDefault({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE_USE})
@interface NonnullByDefault {}
@Nonnull(when = When.MAYBE)
@TypeQualifierDefault({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.TYPE_USE})
@interface NullableByDefault { }
@NullableByDefault
class Bug {
// This is emitting a warning when it shouldn't be.
private String id;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
}