Class Throwing

java.lang.Object
org.openrewrite.internal.Throwing

public final class Throwing extends Object
  • Method Details

    • rethrow

      public static <T> Consumer<T> rethrow(ThrowingConsumer<T> consumer)
    • sneakyThrow

      public static <E extends Throwable> void sneakyThrow(Throwable e) throws E
      The compiler sees the signature with the throws T inferred to a RuntimeException type, so it allows the unchecked exception to propagate. .
      Throws:
      E extends Throwable