This is an automated email from the ASF dual-hosted git repository.

garydgregory 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 e8dad3d5f Do not mutate the input map in 
SwitchTransformer.switchTransformer (#696).
e8dad3d5f is described below

commit e8dad3d5f7558b1dcb405ac9c1be6547fab95976
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jun 28 12:20:44 2026 +0000

    Do not mutate the input map in SwitchTransformer.switchTransformer
    (#696).
---
 src/changes/changes.xml                                                  | 1 +
 .../java/org/apache/commons/collections4/functors/SwitchTransformer.java | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 9b23e8a04..eb1d1315d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -63,6 +63,7 @@
     <action type="fix" dev="ggregory" due-to="Vasiliy Mikhailov, Gary 
Gregory">Fix AbstractMapBag.retainAll removing all copies when the other bag 
has more (#692).</action>
     <action type="fix" dev="ggregory" due-to="Vasiliy Mikhailov, Gary 
Gregory">Fix integer overflow in SetOperations.cosineSimilarity (#693).</action>
     <action type="fix" dev="ggregory" due-to="Vasiliy Mikhailov, Gary 
Gregory">Validate deserialized size in CircularFifoQueue.readObject 
(#678).</action>
+    <action type="fix" dev="ggregory" due-to="Vasiliy Mikhailov, Gary 
Gregory">Do not mutate the input map in SwitchTransformer.switchTransformer 
(#696).</action>
     <!-- ADD -->
     <action type="add" dev="ggregory" due-to="Gary Gregory">Add generics to 
UnmodifiableIterator for the wrapped type.</action>
     <action type="add" dev="ggregory" due-to="Gary Gregory">Add a Maven 
benchmark profile for JMH.</action>
diff --git 
a/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java 
b/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
index a1dd1b623..c56889814 100644
--- 
a/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
+++ 
b/src/main/java/org/apache/commons/collections4/functors/SwitchTransformer.java
@@ -47,6 +47,7 @@ public class SwitchTransformer<T, R> implements 
Transformer<T, R>, Serializable
      * transformer is called. The default transformer is set in the map with a
      * null key. The ordering is that of the iterator() method on the entryset
      * collection of the map.
+     * </p>
      *
      * @param <I>  the input type
      * @param <O>  the output type

Reply via email to