forked from projectlombok/lombok
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fixes projectlombok#3665] Add cast for null arguments
- Loading branch information
Showing
7 changed files
with
69 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
test/transform/resource/after-delombok/StandardExceptionWithFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
public class StandardExceptionWithFields extends Exception { | ||
Integer x; | ||
Integer y; | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public StandardExceptionWithFields() { | ||
this((java.lang.String) null, (java.lang.Throwable) null);1 | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public StandardExceptionWithFields(final java.lang.String message) { | ||
this(message, (java.lang.Throwable) null); | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public StandardExceptionWithFields(final java.lang.Throwable cause) { | ||
this(cause != null ? cause.getMessage() : null, cause); | ||
} | ||
@java.lang.SuppressWarnings("all") | ||
@lombok.Generated | ||
public StandardExceptionWithFields(final java.lang.String message, final java.lang.Throwable cause) { | ||
super(message); | ||
if (cause != null) super.initCause(cause); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
test/transform/resource/after-ecj/StandardExceptionWithFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import lombok.experimental.StandardException; | ||
public @StandardException class StandardExceptionWithFields extends Exception { | ||
Integer x; | ||
Integer y; | ||
public @java.lang.SuppressWarnings("all") @lombok.Generated StandardExceptionWithFields() { | ||
this((java.lang.String) null, (java.lang.Throwable) null); | ||
} | ||
public @java.lang.SuppressWarnings("all") @lombok.Generated StandardExceptionWithFields(final java.lang.String message) { | ||
this(message, (java.lang.Throwable) null); | ||
} | ||
public @java.lang.SuppressWarnings("all") @lombok.Generated StandardExceptionWithFields(final java.lang.Throwable cause) { | ||
this(((cause != null) ? cause.getMessage() : null), cause); | ||
} | ||
public @java.lang.SuppressWarnings("all") @lombok.Generated StandardExceptionWithFields(final java.lang.String message, final java.lang.Throwable cause) { | ||
super(message); | ||
if ((cause != null)) | ||
super.initCause(cause); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
test/transform/resource/before/StandardExceptionWithFields.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import lombok.experimental.StandardException; | ||
|
||
@StandardException | ||
public class StandardExceptionWithFields extends Exception { | ||
Integer x; | ||
Integer y; | ||
} |
1 change: 1 addition & 0 deletions
1
test/transform/resource/messages-ecj/StandardExceptionWithFields.java.messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4 The serializable class StandardExceptionWithFields does not declare a static final serialVersionUID field of type long |