diff --git a/webclient/api/src/main/java/io/helidon/webclient/api/ClientRequestBase.java b/webclient/api/src/main/java/io/helidon/webclient/api/ClientRequestBase.java index bdd3f053203..d1cec37df6e 100644 --- a/webclient/api/src/main/java/io/helidon/webclient/api/ClientRequestBase.java +++ b/webclient/api/src/main/java/io/helidon/webclient/api/ClientRequestBase.java @@ -262,7 +262,7 @@ public R request() { } @Override - public final R submit(Object entity) { + public R submit(Object entity) { if (!(entity instanceof byte[] bytes && bytes.length == 0)) { rejectHeadWithEntity(); } @@ -271,7 +271,7 @@ public final R submit(Object entity) { } @Override - public final R outputStream(OutputStreamHandler outputStreamConsumer) { + public R outputStream(OutputStreamHandler outputStreamConsumer) { rejectHeadWithEntity(); additionalHeaders(); return doOutputStream(outputStreamConsumer); @@ -481,7 +481,7 @@ private String resolvePathParams(String path) { } private void rejectHeadWithEntity() { - if (this.method.equals(Method.HEAD)) { + if (Method.HEAD.equals(this.method)) { throw new IllegalArgumentException("Payload in method '" + Method.HEAD + "' has no defined semantics"); } }