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 abaa661e59095944bd9d16c291129ba6b56d6ff6 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jun 23 09:00:09 2023 -0400 org.apache.commons.net.nntp.Threader now throws IllegalStateException instead of RuntimeException. --- src/changes/changes.xml | 3 +++ src/main/java/org/apache/commons/net/nntp/Threader.java | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 44d17ea6..8f59d4ff 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -91,6 +91,9 @@ The <action> type attribute can be add,update,fix,remove. <action type="fix" dev="ggregory" due-to="Gary Gregory"> FTPCommand.checkArray() now throws IllegalStateException instead of RuntimeException. </action> + <action type="fix" dev="ggregory" due-to="Gary Gregory"> + org.apache.commons.net.nntp.Threader now throws IllegalStateException 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/nntp/Threader.java b/src/main/java/org/apache/commons/net/nntp/Threader.java index 62c311d4..9c11c68d 100644 --- a/src/main/java/org/apache/commons/net/nntp/Threader.java +++ b/src/main/java/org/apache/commons/net/nntp/Threader.java @@ -108,7 +108,7 @@ public class Threader { } if (rest == null) { - throw new RuntimeException("Didnt find " + container + " in parent " + container.parent); + throw new IllegalStateException("Didnt find " + container + " in parent " + container.parent); } // Unlink this container from the parent's child list @@ -142,7 +142,7 @@ public class Threader { final NntpThreadContainer c = entry.getValue(); if (c.parent == null) { if (c.next != null) { - throw new RuntimeException("c.next is " + c.next.toString()); + throw new IllegalStateException("c.next is " + c.next.toString()); } c.next = root.child; root.child = c; @@ -384,7 +384,7 @@ public class Threader { gatherSubjects(root); if (root.next != null) { - throw new RuntimeException("root node has a next:" + root); + throw new IllegalStateException("root node has a next:" + root); } for (NntpThreadContainer r = root.child; r != null; r = r.next) {