gnodet-bot commented on code in PR #28643:
URL: https://github.com/apache/camel/pull/28643#discussion_r4407483196


##########
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_24.adoc:
##########
@@ -145,6 +145,13 @@ graphql, kubernetes-custom-resources and typesafe-ai) now 
have type converters t
 or `InputStream`, so such a body sent to http or a file failed. A `JsonObject` 
or `JsonArray` that holds a value that
 is not JSON, such as a POJO, converts as before.
 
+=== camel-util - FilterIterator.remove after hasNext throws 
IllegalStateException
+
+`FilterIterator.hasNext()` looks ahead in the iterator it wraps, so a 
`remove()` after `next()` and then `hasNext()`
+removed the element after the one `next()` returned, and a `remove()` before 
any `next()` removed an element as well.
+`remove()` now throws `IllegalStateException` unless it directly follows 
`next()`. Code that called `hasNext()`
+between `next()` and `remove()` must call `remove()` first.

Review Comment:
   📝 **Documentation clarity:** The phrase "must call `remove()` first" is 
ambiguous — "first" could be read as "before anything else" rather than "before 
`hasNext()`".
   
   Suggested rewording:
   
   ```suggestion
   between `next()` and `remove()` must reorder to call `remove()` before 
`hasNext()`.
   ```



-- 
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]

Reply via email to