From: Dominik Stadler
Date: Fri, 10 Mar 2023 08:08:16 +0000 (+0000)
Subject: Update/fix JavaDoc and add "throws"
X-Git-Tag: REL_5_2_4~220
X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5b84aae94cd8f95ad2e7ab7c940dbba1ccb440bb;p=poi.git
Update/fix JavaDoc and add "throws"
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1908240 13f79535-47bb-0310-9956-ffa450edef68
---
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;
}