s8sankalp opened a new pull request, #706: URL: https://github.com/apache/commons-collections/pull/706
## Problem When calling `setValue(V value)` on the `MapIterator` returned by `MultiValuedMap.mapIterator()`, it throws an `UnsupportedOperationException`. However, this behavior was previously undocumented in the interface and its implementing classes/decorators, causing confusion for users. For details, see [JIRA COLLECTIONS-732](https://issues.apache.org/jira/browse/COLLECTIONS-732). ## Proposed Changes Documented that the returned map iterator's `setValue` method is unsupported and throws `UnsupportedOperationException` in: - `MultiValuedMap.java` (Interface) - `AbstractMultiValuedMap.java` (Base Implementation, including the inner classes `MultiValuedMapIterator` and `MultiValuedMapEntry`) - `AbstractMultiValuedMapDecorator.java` (Decorator base) - `UnmodifiableMultiValuedMap.java` (Unmodifiable wrapper) ## Verification - Verified that all unit tests compile and pass successfully (`mvn test`). - Existing tests (such as `testMapIteratorUnsupportedSet` in `AbstractMultiValuedMapTest.java`) already assert that `setValue()` throws `UnsupportedOperationException`, confirming the behavior matches the new documentation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
