mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 20:15:09 +00:00
fixed Issue 271: @NotNull annotations should introduce a null check
This commit is contained in:
1 parent
25fbdf0c5b
commit
236c88fc5c
6 files changed
+102
-22
No files matched your search
@@ -1,10 +1,17 @@
|
||||
import java.lang.annotation.*;
|
||||
|
||||
@lombok.RequiredArgsConstructor
|
||||
@lombok.Getter
|
||||
@lombok.Setter
|
||||
class NonNullPlain {
|
||||
@lombok.Setter
|
||||
@lombok.NonNull
|
||||
@lombok.Getter int i;
|
||||
|
||||
@lombok.Getter
|
||||
@lombok.Setter
|
||||
int i;
|
||||
@lombok.NonNull
|
||||
String s;
|
||||
@NotNull
|
||||
Object o;
|
||||
|
||||
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.LOCAL_VARIABLE})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
public @interface NotNull {}
|
||||
}
|
||||
Reference in new issue
Block a user