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 2a427b090 Fix exception message in 
org.apache.commons.collections4.iterators.UnmodifiableIterator.remove() to 
match java.util.Iterator.remove()
2a427b090 is described below

commit 2a427b09048d9b5534a9b01f3417113f5c7f2025
Author: Gary D. Gregory <[email protected]>
AuthorDate: Thu Jul 31 16:55:21 2025 -0400

    Fix exception message in
    org.apache.commons.collections4.iterators.UnmodifiableIterator.remove()
    to match java.util.Iterator.remove()
---
 src/changes/changes.xml                                                 | 1 +
 .../org/apache/commons/collections4/iterators/UnmodifiableIterator.java | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 62e0552c8..e4f824290 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -31,6 +31,7 @@
     <action type="fix" dev="ggregory" due-to="Eric Hubert, Gary 
Gregory">Remove deprecation annotation of 
org.apache.commons.collections4.Closure; this will be deprecated in 5.0 in 
favor of java.util.function.Consumer.</action>
     <action type="fix" dev="ggregory" due-to="Sebastian Götz, Gary Gregory" 
issue="COLLECTIONS-874">MapUtils.getLongValue(Map, K, Function) returns a byte 
instead of a long.</action>
     <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix exception 
message in 
org.apache.commons.collections4.functors.FunctorUtils.validate(Consumer...)</action>
+    <action type="fix" dev="ggregory" due-to="Gary Gregory">Fix exception 
message in 
org.apache.commons.collections4.iterators.UnmodifiableIterator.remove() to 
match java.util.Iterator.remove().</action>
     <!-- ADD -->
     <!-- UPDATE -->
     <action type="update" dev="ggregory" due-to="Gary Gregory, 
Dependabot">Bump org.apache.commons:commons-parent from 81 to 84 #612.</action>
diff --git 
a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
 
b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
index d81b99a6e..b149d6a41 100644
--- 
a/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
+++ 
b/src/main/java/org/apache/commons/collections4/iterators/UnmodifiableIterator.java
@@ -76,7 +76,7 @@ public final class UnmodifiableIterator<E> implements 
Iterator<E>, Unmodifiable
 
     @Override
     public void remove() {
-        throw new UnsupportedOperationException("remove() is not supported");
+        throw new UnsupportedOperationException("remove");
     }
 
 }

Reply via email to