szetszwo commented on PR #8203:
URL: https://github.com/apache/ozone/pull/8203#issuecomment-2936349861
> ... Do you see any risk if we do this ...
@swamirishi , yes.
```java
public synchronized boolean tryAdvance(Consumer<? super T> action) {
```
Are you sure that it is correct to have `synchronized` in `tryAdvance`? The
Java subclass implementations do not have `synchronized`.
Moreover, the change looks simple today but it may require more changes
tomorrow (Just like this PR, it keeps growing unexpectedly.) Let's have a
solid implementation before making a bigger change to the existing code.
`Spliterator` is just for convenience but not any real improvement. Of course,
the new implementation may still use it internally.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]