-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove stacktraces from exceptions thrown deliberately in RESTEasy Re…
…active tests This is done so developers looking at the output of tests will not be tricked by false negatives
- Loading branch information
Showing
6 changed files
with
37 additions
and
15 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
14 changes: 14 additions & 0 deletions
14
...rc/test/java/io/quarkus/resteasy/reactive/server/test/customexceptions/ExceptionUtil.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,14 @@ | ||
package io.quarkus.resteasy.reactive.server.test.customexceptions; | ||
|
||
final class ExceptionUtil { | ||
|
||
private static final StackTraceElement[] EMPTY_STACK_TRACE = new StackTraceElement[0]; | ||
|
||
private ExceptionUtil() { | ||
} | ||
|
||
static <T extends Throwable> T removeStackTrace(T t) { | ||
t.setStackTrace(EMPTY_STACK_TRACE); | ||
return t; | ||
} | ||
} |
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
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