diff --git a/spring-web/src/main/java/org/springframework/http/codec/multipart/PartGenerator.java b/spring-web/src/main/java/org/springframework/http/codec/multipart/PartGenerator.java index 214d37e0097..23a94507d76 100644 --- a/spring-web/src/main/java/org/springframework/http/codec/multipart/PartGenerator.java +++ b/spring-web/src/main/java/org/springframework/http/codec/multipart/PartGenerator.java @@ -688,15 +688,13 @@ final class PartGenerator extends BaseSubscriber { @Override public void onComplete() { this.completed = true; - public void partComplete(boolean finalPart) { State state = PartGenerator.this.state.get(); // writeComplete might have changed our state to IdleFileState if (state != this) { - state.partComplete(finalPart); + state.onComplete(); } else { this.completed = true; - this.finalPart = finalPart; } } @@ -726,7 +724,7 @@ final class PartGenerator extends BaseSubscriber { } else if (changeState(this, newState)) { if (this.completed) { - newState.partComplete(this.finalPart); + newState.onComplete(); } else { requestToken();