diff --git a/compiler/src/main/java/com/github/mustachejava/reflect/GuardedWrapper.java b/compiler/src/main/java/com/github/mustachejava/reflect/GuardedWrapper.java index c03146a53..13b43fc6d 100644 --- a/compiler/src/main/java/com/github/mustachejava/reflect/GuardedWrapper.java +++ b/compiler/src/main/java/com/github/mustachejava/reflect/GuardedWrapper.java @@ -17,10 +17,6 @@ public class GuardedWrapper implements Wrapper { @SuppressWarnings("ThrowableInstanceNeverThrown") protected static final GuardException guardException = new GuardException(); - static { - guardException.setStackTrace(new StackTraceElement[0]); - } - // Array of guards that must be satisfied protected final Guard[] guards; diff --git a/compiler/src/main/java/com/github/mustachejava/util/GuardException.java b/compiler/src/main/java/com/github/mustachejava/util/GuardException.java index da144bd04..fceee4fe3 100644 --- a/compiler/src/main/java/com/github/mustachejava/util/GuardException.java +++ b/compiler/src/main/java/com/github/mustachejava/util/GuardException.java @@ -6,9 +6,10 @@ */ public class GuardException extends RuntimeException { public GuardException() { + super(null, null, false, false); } public GuardException(String message) { - super(message); + super(message, null, false, false); } }