Skip to content

Commit d554d27

Browse files
committed
Fix build
1 parent 25ddb9b commit d554d27

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

client/src/main/java/org/asynchttpclient/handler/BodyDeferringAsyncHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception
140140
headersArrived.countDown();
141141
}
142142

143-
bodyPart.writeTo(output);
143+
output.write(bodyPart.getBodyPartBytes());
144144
return State.CONTINUE;
145145
}
146146

client/src/test/java/org/asynchttpclient/reactivestreams/ReactiveStreamsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public byte[] getBytes() throws Throwable {
133133
List<HttpResponseBodyPart> bodyParts = subscriber.getElements();
134134
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
135135
for (HttpResponseBodyPart part : bodyParts) {
136-
part.writeTo(bytes);
136+
bytes.write(part.getBodyPartBytes());
137137
}
138138
return bytes.toByteArray();
139139
}

client/src/test/java/org/asynchttpclient/request/body/ZeroCopyFileTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public void onThrowable(Throwable t) {
123123
}
124124

125125
public State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception {
126-
bodyPart.writeTo(stream);
126+
stream.write(bodyPart.getBodyPartBytes());
127127
return State.CONTINUE;
128128
}
129129

@@ -156,7 +156,7 @@ public void onThrowable(Throwable t) {
156156
}
157157

158158
public State onBodyPartReceived(HttpResponseBodyPart bodyPart) throws Exception {
159-
bodyPart.writeTo(stream);
159+
stream.write(bodyPart.getBodyPartBytes());
160160

161161
if (bodyPart.getBodyPartBytes().length == 0) {
162162
return State.ABORT;

0 commit comments

Comments
 (0)