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"); }