Skip to content

Commit ab9a0f9

Browse files
committed
Throw a RuntimeException subclass instead of RuntimeException
1 parent 70b55b6 commit ab9a0f9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/org/apache/commons/cli/Option.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ public Object clone() {
479479
final Option option = (Option) super.clone();
480480
option.values = new ArrayList<>(values);
481481
return option;
482-
} catch (final CloneNotSupportedException cnse) {
483-
throw new IllegalStateException("A CloneNotSupportedException was thrown: " + cnse.getMessage());
482+
} catch (final CloneNotSupportedException e) {
483+
throw new UnsupportedOperationException(e.getMessage(), e);
484484
}
485485
}
486486

0 commit comments

Comments
 (0)