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 b01ed8d1c 
org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceEntry.toReference(ReferenceStrength,
 T, int) now throws IllegalArgumentException instead of Error
b01ed8d1c is described below

commit b01ed8d1c7e54332fe8587b2c4b223bafa397a46
Author: Gary D. Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Apr 29 08:18:53 2025 -0400

    
org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceEntry.toReference(ReferenceStrength,
    T, int) now throws IllegalArgumentException instead of Error
---
 src/changes/changes.xml                                                 | 1 +
 .../java/org/apache/commons/collections4/map/AbstractReferenceMap.java  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index c6cba5b36..5dcfca1c6 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -24,6 +24,7 @@
   <body>
   <release version="4.5.1" date="YYYY-MM-DD" description="This is a feature 
and maintenance release. Java 8 or later is required.">
     <!-- FIX -->
+    <action type="fix" dev="ggregory" due-to="Gary 
Gregory">org.apache.commons.collections4.map.AbstractReferenceMap.ReferenceEntry.toReference(ReferenceStrength,
 T, int) now throws IllegalArgumentException instead of Error</action>
     <!-- ADD -->
     <!-- UPDATE -->
   </release>
diff --git 
a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java 
b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
index 913f42a75..840bd5496 100644
--- 
a/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
+++ 
b/src/main/java/org/apache/commons/collections4/map/AbstractReferenceMap.java
@@ -368,7 +368,7 @@ public abstract class AbstractReferenceMap<K, V> extends 
AbstractHashedMap<K, V>
             default:
                 break;
             }
-            throw new Error();
+            throw new IllegalArgumentException(type.toString());
         }
     }
 

Reply via email to