From 5b84aae94cd8f95ad2e7ab7c940dbba1ccb440bb Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Fri, 10 Mar 2023 08:08:16 +0000 Subject: [PATCH] Update/fix JavaDoc and add "throws" git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908240 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/poi/hsmf/datatypes/StoragePropertiesChunk.java | 2 +- poi/src/main/java/org/apache/poi/util/ExceptionUtil.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/StoragePropertiesChunk.java b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/StoragePropertiesChunk.java index 0ba57106fe..d236002ad1 100644 --- a/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/StoragePropertiesChunk.java +++ b/poi-scratchpad/src/main/java/org/apache/poi/hsmf/datatypes/StoragePropertiesChunk.java @@ -54,7 +54,7 @@ public class StoragePropertiesChunk extends PropertiesChunk { * Writes out pre-calculated header values which assume any variable length property `data` * field to already have Size and Reserved * @param out output stream (calling code must close this stream) - * @throws IOException + * @throws IOException If writing to the stream fails */ public void writePreCalculatedValue(OutputStream out) throws IOException { // 8 bytes of reserved zeros diff --git a/poi/src/main/java/org/apache/poi/util/ExceptionUtil.java b/poi/src/main/java/org/apache/poi/util/ExceptionUtil.java index db44ce9587..5e41052ede 100644 --- a/poi/src/main/java/org/apache/poi/util/ExceptionUtil.java +++ b/poi/src/main/java/org/apache/poi/util/ExceptionUtil.java @@ -49,8 +49,11 @@ public class ExceptionUtil { *

* * @param throwable to check + * @throws Error the input throwable if it is an Error. + * @throws RuntimeException the input throwable if it is an RuntimeException + * Otherwise wraps the throwable in a RuntimeException. */ - public static void rethrow(Throwable throwable) { + public static void rethrow(Throwable throwable) throws Error, RuntimeException { if (throwable instanceof Error) { throw (Error) throwable; } -- 2.39.5