Bug Description
When calling transform() on an IncrementalExecutionResultImpl, the method returns an IncrementalExecutionResult of the correct type, but loses the incremental-specific field values (incremental, hasNext, incrementalPublisher).
Expected Behavior
The transform() method should preserve both the incremental result type AND its specific field values.
Current Behavior
The transformed result is correctly typed as IncrementalExecutionResult but the incremental data fields are lost/null.
Reproduction
ExecutionResult incrementalResult = IncrementalExecutionResultImpl
.newIncrementalExecutionResult()
.incremental(List.of(DeferPayload.newDeferredItem().data("hello").build()))
.build();
var transformedResult = incrementalResult.transform(builder -> builder.addExtension("key", "value"));
// transformedResult is correctly IncrementalExecutionResult, but incremental data is lost
assert transformedResult instanceof IncrementalExecutionResult; // PASSES
IncrementalExecutionResult incResult = (IncrementalExecutionResult) transformedResult;
assert incResult.getIncremental() != null; // FAILS - incremental data is lost
Impact
This breaks the contract that transform() should preserve all result data while allowing modifications. Users lose incremental payloads when transforming results.
Bug Description
When calling
transform()on anIncrementalExecutionResultImpl, the method returns anIncrementalExecutionResultof the correct type, but loses the incremental-specific field values (incremental,hasNext,incrementalPublisher).Expected Behavior
The
transform()method should preserve both the incremental result type AND its specific field values.Current Behavior
The transformed result is correctly typed as
IncrementalExecutionResultbut the incremental data fields are lost/null.Reproduction
Impact
This breaks the contract that
transform()should preserve all result data while allowing modifications. Users lose incremental payloads when transforming results.