aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource')
-rw-r--r--test/transform/resource/after-delombok/StandardExceptions.java33
-rw-r--r--test/transform/resource/after-ecj/StandardExceptions.java34
-rw-r--r--test/transform/resource/before/StandardExceptions.java3
-rw-r--r--test/transform/resource/messages-ecj/StandardExceptions.java.messages2
4 files changed, 53 insertions, 19 deletions
diff --git a/test/transform/resource/after-delombok/StandardExceptions.java b/test/transform/resource/after-delombok/StandardExceptions.java
index 47453f50..d60fcaf2 100644
--- a/test/transform/resource/after-delombok/StandardExceptions.java
+++ b/test/transform/resource/after-delombok/StandardExceptions.java
@@ -1,39 +1,36 @@
class EmptyException extends Exception {
@java.lang.SuppressWarnings("all")
public EmptyException() {
+ this(null, null);
}
-
@java.lang.SuppressWarnings("all")
- public EmptyException(final String message) {
- super(message);
+ public EmptyException(final java.lang.String message) {
+ this(message, null);
}
-
@java.lang.SuppressWarnings("all")
- public EmptyException(final Throwable cause) {
- super(cause);
+ public EmptyException(final java.lang.Throwable cause) {
+ this(cause != null ? cause.getMessage() : null, cause);
}
-
@java.lang.SuppressWarnings("all")
- public EmptyException(final String message, final Throwable cause) {
- super(message, cause);
+ public EmptyException(final java.lang.String message, final java.lang.Throwable cause) {
+ super(message);
+ if (cause != null) super.initCause(cause);
}
}
class NoArgsException extends Exception {
public NoArgsException() {
}
-
@java.lang.SuppressWarnings("all")
- public NoArgsException(final String message) {
- super(message);
+ protected NoArgsException(final java.lang.String message) {
+ this(message, null);
}
-
@java.lang.SuppressWarnings("all")
- public NoArgsException(final Throwable cause) {
- super(cause);
+ protected NoArgsException(final java.lang.Throwable cause) {
+ this(cause != null ? cause.getMessage() : null, cause);
}
-
@java.lang.SuppressWarnings("all")
- public NoArgsException(final String message, final Throwable cause) {
- super(message, cause);
+ protected NoArgsException(final java.lang.String message, final java.lang.Throwable cause) {
+ super(message);
+ if (cause != null) super.initCause(cause);
}
} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/StandardExceptions.java b/test/transform/resource/after-ecj/StandardExceptions.java
new file mode 100644
index 00000000..a26a16f7
--- /dev/null
+++ b/test/transform/resource/after-ecj/StandardExceptions.java
@@ -0,0 +1,34 @@
+import lombok.AccessLevel;
+import lombok.experimental.StandardException;
+@StandardException class EmptyException extends Exception {
+ public @java.lang.SuppressWarnings("all") EmptyException() {
+ this(null, null);
+ }
+ public @java.lang.SuppressWarnings("all") EmptyException(final java.lang.String message) {
+ this(message, null);
+ }
+ public @java.lang.SuppressWarnings("all") EmptyException(final java.lang.Throwable cause) {
+ this(((cause != null) ? cause.getMessage() : null), cause);
+ }
+ public @java.lang.SuppressWarnings("all") EmptyException(final java.lang.String message, final java.lang.Throwable cause) {
+ super(message);
+ if ((cause != null))
+ super.initCause(cause);
+ }
+}
+@StandardException(access = AccessLevel.PROTECTED) class NoArgsException extends Exception {
+ public NoArgsException() {
+ super();
+ }
+ protected @java.lang.SuppressWarnings("all") NoArgsException(final java.lang.String message) {
+ this(message, null);
+ }
+ protected @java.lang.SuppressWarnings("all") NoArgsException(final java.lang.Throwable cause) {
+ this(((cause != null) ? cause.getMessage() : null), cause);
+ }
+ protected @java.lang.SuppressWarnings("all") NoArgsException(final java.lang.String message, final java.lang.Throwable cause) {
+ super(message);
+ if ((cause != null))
+ super.initCause(cause);
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/before/StandardExceptions.java b/test/transform/resource/before/StandardExceptions.java
index 939e1b6b..1316011d 100644
--- a/test/transform/resource/before/StandardExceptions.java
+++ b/test/transform/resource/before/StandardExceptions.java
@@ -1,8 +1,9 @@
+import lombok.AccessLevel;
import lombok.experimental.StandardException;
@StandardException class EmptyException extends Exception {
}
-@StandardException class NoArgsException extends Exception {
+@StandardException(access = AccessLevel.PROTECTED) class NoArgsException extends Exception {
public NoArgsException() {
}
}
diff --git a/test/transform/resource/messages-ecj/StandardExceptions.java.messages b/test/transform/resource/messages-ecj/StandardExceptions.java.messages
new file mode 100644
index 00000000..6fdc61c5
--- /dev/null
+++ b/test/transform/resource/messages-ecj/StandardExceptions.java.messages
@@ -0,0 +1,2 @@
+4 The serializable class EmptyException does not declare a static final serialVersionUID field of type long
+6 The serializable class NoArgsException does not declare a static final serialVersionUID field of type long