aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/CannotCompileException.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/javassist/CannotCompileException.java')
-rw-r--r--src/main/javassist/CannotCompileException.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/javassist/CannotCompileException.java b/src/main/javassist/CannotCompileException.java
index 9c699287..d8a6e192 100644
--- a/src/main/javassist/CannotCompileException.java
+++ b/src/main/javassist/CannotCompileException.java
@@ -22,13 +22,16 @@ import javassist.compiler.CompileError;
* Thrown when bytecode transformation has failed.
*/
public class CannotCompileException extends Exception {
+ /** default serialVersionUID */
+ private static final long serialVersionUID = 1L;
private Throwable myCause;
/**
* Gets the cause of this throwable.
* It is for JDK 1.3 compatibility.
*/
- public Throwable getCause() {
+ @Override
+ public synchronized Throwable getCause() {
return (myCause == this ? null : myCause);
}
@@ -36,6 +39,7 @@ public class CannotCompileException extends Exception {
* Initializes the cause of this throwable.
* It is for JDK 1.3 compatibility.
*/
+ @Override
public synchronized Throwable initCause(Throwable cause) {
myCause = cause;
return this;
@@ -49,8 +53,7 @@ public class CannotCompileException extends Exception {
public String getReason() {
if (message != null)
return message;
- else
- return this.toString();
+ return this.toString();
}
/**