mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 14:16:11 +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
@@ -6,14 +6,14 @@ public class NonNullWithAlternateException {
|
||||
public void testMethod(@lombok.NonNull String arg) {
|
||||
if ((arg == null))
|
||||
{
|
||||
throw new java.lang.IllegalArgumentException("arg is marked @NonNull but is null");
|
||||
throw new java.lang.IllegalArgumentException("arg is marked non-null but is null");
|
||||
}
|
||||
System.out.println(arg);
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") void setTest(final @lombok.NonNull String test) {
|
||||
if ((test == null))
|
||||
{
|
||||
throw new java.lang.IllegalArgumentException("test is marked @NonNull but is null");
|
||||
throw new java.lang.IllegalArgumentException("test is marked non-null but is null");
|
||||
}
|
||||
this.test = test;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user