diff --git a/api/src/main/java/org/apache/iceberg/util/ExceptionUtil.java b/api/src/main/java/org/apache/iceberg/util/ExceptionUtil.java index 76a1a1c97c4f..f6301aec1c76 100644 --- a/api/src/main/java/org/apache/iceberg/util/ExceptionUtil.java +++ b/api/src/main/java/org/apache/iceberg/util/ExceptionUtil.java @@ -53,6 +53,11 @@ public interface FinallyBlock { void run() throws Exception; } + /** + * This function is unused outside of the associated tests in TestExceptionUtil. + * @deprecated since 0.14.0. Will be removed in 1.0.0. + */ + @Deprecated public static R runSafely( Block block, CatchBlock catchBlock, @@ -61,6 +66,11 @@ public static R runSafely( RuntimeException.class, RuntimeException.class, RuntimeException.class); } + /** + * This function is unused outside of the associated tests in TestExceptionUtil. + * @deprecated since 0.14.0. Will be removed in 1.0.0. + */ + @Deprecated public static R runSafely( Block block, CatchBlock catchBlock, @@ -69,6 +79,11 @@ public static R runSafely( return runSafely(block, catchBlock, finallyBlock, e1Class, RuntimeException.class, RuntimeException.class); } + /** + * This function is unused outside the associated tests in TestExceptionUtil. + * @deprecated since 0.14.0. Will be removed in 1.0.0. + */ + @Deprecated public static R runSafely( Block block, CatchBlock catchBlock, @@ -78,6 +93,12 @@ public static R runSafely( return runSafely(block, catchBlock, finallyBlock, e1Class, e2Class, RuntimeException.class); } + /** + * This function is unused outside the associated tests in TestExceptionUtil. + * @deprecated since 0.14.0. Will be removed in 1.0.0. + */ + @Deprecated + @SuppressWarnings("Finally") public static R runSafely( Block block, CatchBlock catchBlock,