mirror of
https://github.com/aikar/commands.git
synced 2026-05-31 06:11:55 +00:00
stuff
This commit is contained in:
@@ -853,14 +853,13 @@ final class CommandUtil {
|
||||
return name != null && !name.isEmpty() && CommandPatterns.VALID_NAME_PATTERN.matcher(name).matches();
|
||||
}
|
||||
|
||||
public static void sneaky(Throwable t)
|
||||
{
|
||||
public static void sneaky(Throwable t) {
|
||||
//noinspection RedundantTypeArguments
|
||||
throw CommandUtil.<RuntimeException>superSneaky( t );
|
||||
}
|
||||
|
||||
private static <T extends Throwable> T superSneaky(Throwable t) throws T
|
||||
{
|
||||
//noinspection ConstantConditions
|
||||
private static <T extends Throwable> T superSneaky(Throwable t) throws T {
|
||||
//noinspection ConstantConditions,unchecked
|
||||
throw (T) t;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user