This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-net.git

commit 68c200462a3117c53283ea2f8488163ca61edb95
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Jun 23 09:17:49 2023 -0400

    IMAPExportMbox.MboxListener.chunkReceived(IMAP) now throws
    UncheckedIOException
    instead of RuntimeException.
---
 src/changes/changes.xml                                                | 3 +++
 src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index b2e0f635..0eeaa1cd 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -103,6 +103,9 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="fix" dev="ggregory" due-to="Gary Gregory">
         SubnetUtils.SubnetInfo.getPreviousAddress() now throws 
IllegalStateException instead of RuntimeException.
       </action>
+      <action type="fix" dev="ggregory" due-to="Gary Gregory">
+        IMAPExportMbox.MboxListener.chunkReceived(IMAP) now throws 
UncheckedIOException instead of RuntimeException.
+      </action>
       <!-- UPDATE -->
       <action type="update" dev="ggregory" due-to="Dependabot">
         Bump commons-parent from 54 to 58 #132, #137, #153.
diff --git 
a/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java 
b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
index 9960c850..562baeb4 100644
--- a/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
+++ b/src/main/java/org/apache/commons/net/examples/mail/IMAPExportMbox.java
@@ -21,6 +21,7 @@ import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.text.ParseException;
@@ -172,7 +173,7 @@ public final class IMAPExportMbox {
                 bufferedWriter.append(lineSeparator); // blank line between 
entries
             } catch (final IOException e) {
                 e.printStackTrace();
-                throw new RuntimeException(e); // chunkReceived cannot throw a 
checked Exception
+                throw new UncheckedIOException(e); // chunkReceived cannot 
throw a checked Exception
             }
             lastFetched = firstLine;
             total.incrementAndGet();

Reply via email to