This commit is contained in:
Aikar
2017-01-07 20:16:18 -05:00
parent ab8e90c250
commit 18cdf7a55e
@@ -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;
}