Skip to content

Commit

Permalink
Throw a RuntimeException subclass instead of an Error
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jul 6, 2023
1 parent fb7dae4 commit 32d8bdf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ protected AbstractHashedMap<K, V> clone() {
cloned.putAll(this);
return cloned;
} catch (final CloneNotSupportedException ex) {
throw new InternalError();
throw new UnsupportedOperationException(ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ public Flat3Map<K, V> clone() {
}
return cloned;
} catch (final CloneNotSupportedException ex) {
throw new InternalError();
throw new UnsupportedOperationException(ex);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ public MultiKeyMap<K, V> clone() {
try {
return (MultiKeyMap<K, V>) super.clone();
} catch (final CloneNotSupportedException e) {
throw new InternalError();
throw new UnsupportedOperationException(e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public SingletonMap<K, V> clone() {
try {
return (SingletonMap<K, V>) super.clone();
} catch (final CloneNotSupportedException ex) {
throw new InternalError();
throw new UnsupportedOperationException(ex);
}
}

Expand Down

0 comments on commit 32d8bdf

Please sign in to comment.