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 anError.
+ * @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;
}