Skip to content

Commit 0f6d2d3

Browse files
committed
Make ClientRequestBase mock friendly
Signed-off-by: Jorge Bescos Gascon <jorge.bescos.gascon@oracle.com>
1 parent 6e9b457 commit 0f6d2d3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

webclient/api/src/main/java/io/helidon/webclient/api/ClientRequestBase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public R request() {
262262
}
263263

264264
@Override
265-
public final R submit(Object entity) {
265+
public R submit(Object entity) {
266266
if (!(entity instanceof byte[] bytes && bytes.length == 0)) {
267267
rejectHeadWithEntity();
268268
}
@@ -271,7 +271,7 @@ public final R submit(Object entity) {
271271
}
272272

273273
@Override
274-
public final R outputStream(OutputStreamHandler outputStreamConsumer) {
274+
public R outputStream(OutputStreamHandler outputStreamConsumer) {
275275
rejectHeadWithEntity();
276276
additionalHeaders();
277277
return doOutputStream(outputStreamConsumer);
@@ -481,7 +481,7 @@ private String resolvePathParams(String path) {
481481
}
482482

483483
private void rejectHeadWithEntity() {
484-
if (this.method.equals(Method.HEAD)) {
484+
if (Method.HEAD.equals(this.method)) {
485485
throw new IllegalArgumentException("Payload in method '" + Method.HEAD + "' has no defined semantics");
486486
}
487487
}

0 commit comments

Comments
 (0)