Minor refactor in HttpRemoteTask
@@ -495,10 +495,7 @@ public final class HttpRemoteTask
List<TaskSource> sources = getSources();
- Optional<PlanFragment> fragment = Optional.empty();
- if (sendPlan.get()) {
- fragment = Optional.of(planFragment);
- }
+ Optional<PlanFragment> fragment = sendPlan.get() ? Optional.of(planFragment) : Optional.empty();
TaskUpdateRequest updateRequest = new TaskUpdateRequest(
session.toSessionRepresentation(),
fragment,
