You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/07/06 19:36:50 UTC
[commons-collections] branch master updated: Throw a RuntimeException subclass instead of an Error
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-collections.git
The following commit(s) were added to refs/heads/master by this push:
new 32d8bdfdb Throw a RuntimeException subclass instead of an Error
32d8bdfdb is described below
commit 32d8bdfdbbe9cdfa6d0a969208b25f4ca08058e7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Jul 6 15:36:46 2023 -0400
Throw a RuntimeException subclass instead of an Error
---
.../java/org/apache/commons/collections4/map/AbstractHashedMap.java | 2 +-
src/main/java/org/apache/commons/collections4/map/Flat3Map.java | 2 +-
src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java | 2 +-
src/main/java/org/apache/commons/collections4/map/SingletonMap.java | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
index 8508180e2..a7a54081a 100644
--- a/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/AbstractHashedMap.java
@@ -1306,7 +1306,7 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
cloned.putAll(this);
return cloned;
} catch (final CloneNotSupportedException ex) {
- throw new InternalError();
+ throw new UnsupportedOperationException(ex);
}
}
diff --git a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
index 4ac53fcaa..4666a7939 100644
--- a/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
+++ b/src/main/java/org/apache/commons/collections4/map/Flat3Map.java
@@ -1155,7 +1155,7 @@ public class Flat3Map<K, V> implements IterableMap<K, V>, Serializable, Cloneabl
}
return cloned;
} catch (final CloneNotSupportedException ex) {
- throw new InternalError();
+ throw new UnsupportedOperationException(ex);
}
}
diff --git a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java
index 0250f3f36..64b38a50a 100644
--- a/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/MultiKeyMap.java
@@ -828,7 +828,7 @@ public class MultiKeyMap<K, V> extends AbstractMapDecorator<MultiKey<? extends K
try {
return (MultiKeyMap<K, V>) super.clone();
} catch (final CloneNotSupportedException e) {
- throw new InternalError();
+ throw new UnsupportedOperationException(e);
}
}
diff --git a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
index d952f1d09..c76917c85 100644
--- a/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
+++ b/src/main/java/org/apache/commons/collections4/map/SingletonMap.java
@@ -538,7 +538,7 @@ public class SingletonMap<K, V>
try {
return (SingletonMap<K, V>) super.clone();
} catch (final CloneNotSupportedException ex) {
- throw new InternalError();
+ throw new UnsupportedOperationException(ex);
}
}