mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 11:00:04 +07:00
29 lines
698 B
Java
29 lines
698 B
Java
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;
|
|
}
|
|
} |