rdblue commented on code in PR #4863:
URL: https://github.com/apache/iceberg/pull/4863#discussion_r884323165
##########
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:
Only use `this.` when modifying instance state. It helps the reader know
that it is instance state being modified rather than local state. No need to
use it when accessing state, only when modifying.
--
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]