mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 08:15:48 +00:00
[i2078] Add possibility to generate assert on @NonNull
This commit is contained in:
1 parent
e4b61e1263
commit
4e7414038a
40 files changed
+261
-163
No files matched your search
@@ -0,0 +1,13 @@
|
||||
//CONF: lombok.nonNull.exceptionType = Assertion
|
||||
|
||||
public class NonNullWithAssertion {
|
||||
@lombok.NonNull @lombok.Setter private String test;
|
||||
|
||||
public void testMethod(@lombok.NonNull String arg) {
|
||||
System.out.println(arg);
|
||||
}
|
||||
|
||||
public void testMethodWithIf(@lombok.NonNull String arg) {
|
||||
if (arg == null) throw new NullPointerException("Oops");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user