Skip to content

Commit

Permalink
Add javadocs
Browse files Browse the repository at this point in the history
  • Loading branch information
normanmaurer committed Mar 9, 2020
1 parent a49edb8 commit 72191ba
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

import java.nio.channels.ClosedChannelException;

/**
* {@link ClosedChannelException} that will not not fill in the stacktrace but use a cheaper way of producing
* limited stacktrace details for the user.
*/
public final class StacklessClosedChannelException extends ClosedChannelException {

private StacklessClosedChannelException() { }
Expand All @@ -29,6 +33,13 @@ public Throwable fillInStackTrace() {
return this;
}

/**
* Creates a new {@link StacklessClosedChannelException} instance.
*
* @param clazz The class in which this {@link StacklessClosedChannelException} will be used.
* @param method The method from which it will be thrown.
* @return a new instance.
*/
public static StacklessClosedChannelException newInstance(Class<?> clazz, String method) {
return ThrowableUtils.unknownStackTrace(new StacklessClosedChannelException(), clazz, method);
}
Expand Down

0 comments on commit 72191ba

Please sign in to comment.