blob: d6f2b0f16c2a80dda74f382e26daf19e08fb7d67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
public class NonNullWithAssertion {
private @lombok.NonNull @lombok.Setter String test;
public NonNullWithAssertion() {
super();
}
public void testMethod(@lombok.NonNull String arg) {
assert (arg != null): "arg is marked non-null but is null";
System.out.println(arg);
}
public void testMethodWithIf(@lombok.NonNull String arg) {
if ((arg == null))
throw new NullPointerException("Oops");
}
public @java.lang.SuppressWarnings("all") void setTest(final @lombok.NonNull String test) {
assert (test != null): "test is marked non-null but is null";
this.test = test;
}
}
|