From fb7dae4909282517eefaae925bd1527173679fbe Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Thu, 6 Jul 2023 15:19:23 -0400 Subject: [PATCH] Throw a RuntimeException subclass instead of RuntimeException --- .../java/org/apache/commons/collections4/list/TreeList.java | 2 +- .../commons/collections4/sequence/SequencesComparator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/collections4/list/TreeList.java b/src/main/java/org/apache/commons/collections4/list/TreeList.java index 65ec38995f..9ab1ccd00d 100644 --- a/src/main/java/org/apache/commons/collections4/list/TreeList.java +++ b/src/main/java/org/apache/commons/collections4/list/TreeList.java @@ -686,7 +686,7 @@ private AVLNode balance() { } return rotateLeft(); default : - throw new RuntimeException("tree inconsistent!"); + throw new IllegalStateException("tree inconsistent!"); } } diff --git a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java index acd6aa9849..327a7a5d62 100644 --- a/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java +++ b/src/main/java/org/apache/commons/collections4/sequence/SequencesComparator.java @@ -234,7 +234,7 @@ private Snake getMiddleSnake(final int start1, final int end1, final int start2, } // this should not happen - throw new RuntimeException("Internal Error"); + throw new IllegalStateException("Internal Error"); }