Skip to content

Commit

Permalink
add comment about class init
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymode committed Jan 23, 2018
1 parent 8ef7447 commit b073780
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public InternalLogger newInstance(final String name) {
public static void setup() {
// TODO remove this once we get a fix into Netty so we don't have to do this
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
// this is triggering class initialization which triggers the reflective retrieval of
// the Throwable#addSuppressed method. We need to do this to avoid
// AccessControlExceptions that this code would otherwise trigger without us wrapping
// it in a doPrivileged block
ThrowableUtil.haveSuppressed();
return null;
});
Expand Down

0 comments on commit b073780

Please sign in to comment.