@GopalAkshintala
private static boolean validate2Throwable(Map badEggFailureBucketMap, int eggIndex,
Iterator iterator, Egg eggToBeValidated) {
try {
if (!throwableOperation2(eggToBeValidated)) {
iterator.remove();
badEggFailureBucketMap.put(eggIndex, TOO_LATE_TO_HATCH_2);
return false;
}
} catch (Exception e) {
iterator.remove();
badEggFailureBucketMap.put(eggIndex, ValidationFailure.withErrorMessage(e.getMessage()));
return false;
}
return true;
}
static final ThrowableValidator validate2Throwable = validatedEgg "-> validatedEgg
.filterOrElse(Operations"::throwableOperation2, ignore "-> TOO_LATE_TO_HATCH_2);
validate2Throwable