kbendick commented on code in PR #4863:
URL: https://github.com/apache/iceberg/pull/4863#discussion_r884324269
##########
core/src/main/java/org/apache/iceberg/util/Tasks.java:
##########
@@ -205,11 +215,12 @@ private <E extends Exception> boolean runSingleThreaded(
List<I> succeeded = Lists.newArrayList();
List<Throwable> exceptions = Lists.newArrayList();
- Iterator<I> iterator = items.iterator();
+ Preconditions.checkState(!hasStarted, "Cannot run twice");
+ hasStarted = true;
Review Comment:
Isn’t this line of code modifying instances state though (assigning a class
variable from false to true)?
--
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]