mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 10:18:46 +00:00
Added confkey to make @NonNull generate a different exception because of the IllegalArgumentException vs. NullPointerException that we really don’t want to get into.
This commit is contained in:
1 parent
57c92478a9
commit
4b878f9ba9
25 files changed
+252
-94
No files matched your search
@@ -0,0 +1,20 @@
|
||||
public class NonNullWithAlternateException {
|
||||
private @lombok.NonNull @lombok.Setter String test;
|
||||
public NonNullWithAlternateException() {
|
||||
super();
|
||||
}
|
||||
public void testMethod(@lombok.NonNull String arg) {
|
||||
if ((arg == null))
|
||||
{
|
||||
throw new java.lang.IllegalArgumentException("arg");
|
||||
}
|
||||
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");
|
||||
}
|
||||
this.test = test;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user