Skip to content

Commit dacaf6b

Browse files
committed
checkstyle fixes
1 parent f7d876f commit dacaf6b

File tree

12 files changed

+51
-13
lines changed

12 files changed

+51
-13
lines changed

java-client/src/main/java/co/elastic/clients/transport/rest5_client/Rest5ClientHttpClient.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ public void close() throws IOException {
132132
}
133133

134134
private co.elastic.clients.transport.rest5_client.low_level.Request createRestRequest(Request request, Rest5ClientOptions options) {
135-
co.elastic.clients.transport.rest5_client.low_level.Request clientReq = new co.elastic.clients.transport.rest5_client.low_level.Request(
136-
request.method(), request.path()
137-
);
135+
co.elastic.clients.transport.rest5_client.low_level.Request clientReq =
136+
new co.elastic.clients.transport.rest5_client.low_level.Request(request.method(), request.path());
138137

139138
Iterable<ByteBuffer> body = request.body();
140139

java-client/src/main/java/co/elastic/clients/transport/rest5_client/Rest5ClientTransport.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public Rest5ClientTransport(Rest5Client restClient, JsonpMapper jsonpMapper, Res
4141
this.restClient = restClient;
4242
}
4343

44-
public Rest5ClientTransport(Rest5Client restClient, JsonpMapper jsonpMapper, Rest5ClientOptions options, Instrumentation instrumentation) {
44+
public Rest5ClientTransport(Rest5Client restClient, JsonpMapper jsonpMapper, Rest5ClientOptions options,
45+
Instrumentation instrumentation) {
4546
super(new Rest5ClientHttpClient(restClient), options, jsonpMapper, instrumentation);
4647
this.restClient = restClient;
4748
}

java-client/src/main/java/co/elastic/clients/transport/rest5_client/low_level/BasicAsyncEntityProducer.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package co.elastic.clients.transport.rest5_client.low_level;
221

322
import org.apache.hc.core5.http.HttpEntity;

java-client/src/main/java/co/elastic/clients/transport/rest5_client/low_level/Constants.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package co.elastic.clients.transport.rest5_client.low_level;
221

322
public class Constants {

java-client/src/main/java/co/elastic/clients/transport/rest5_client/low_level/HttpDeleteWithEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class HttpDeleteWithEntity extends HttpUriRequestBase {
3030

3131
static final String METHOD_NAME = HttpDelete.METHOD_NAME;
3232

33-
public HttpDeleteWithEntity(URI requestUri) {
33+
HttpDeleteWithEntity(URI requestUri) {
3434
super(METHOD_NAME, requestUri);
3535
}
3636

java-client/src/main/java/co/elastic/clients/transport/rest5_client/low_level/HttpGetWithEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class HttpGetWithEntity extends HttpUriRequestBase {
3030

3131
static final String METHOD_NAME = HttpGet.METHOD_NAME;
3232

33-
public HttpGetWithEntity(URI requestUri) {
33+
HttpGetWithEntity(URI requestUri) {
3434
super(METHOD_NAME, requestUri);
3535
}
3636

java-client/src/main/java/co/elastic/clients/transport/rest5_client/low_level/Rest5Client.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
import java.net.URISyntaxException;
6464
import java.util.ArrayList;
6565
import java.util.Arrays;
66-
import java.util.Base64;
6766
import java.util.Collection;
6867
import java.util.Collections;
6968
import java.util.HashMap;
@@ -82,7 +81,6 @@
8281
import java.util.concurrent.atomic.AtomicInteger;
8382
import java.util.stream.Collectors;
8483

85-
import static java.nio.charset.StandardCharsets.UTF_8;
8684
import static java.util.Collections.singletonList;
8785
import static org.apache.hc.core5.http.HttpHeaders.CONTENT_ENCODING;
8886
import static org.apache.hc.core5.http.HttpHeaders.CONTENT_LENGTH;

java-client/src/test/java/co/elastic/clients/elasticsearch/_helpers/ClientBuildersTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public void buildRest5() {
6565
.usernameAndPassword("elastic", "changeme")
6666
.build();
6767

68-
Rest5ClientOptions options = new Rest5ClientOptions(co.elastic.clients.transport.rest5_client.low_level.RequestOptions.DEFAULT, true);
68+
Rest5ClientOptions options = new Rest5ClientOptions(co.elastic.clients.transport.rest5_client.low_level.RequestOptions.DEFAULT,
69+
true);
6970

7071
client = client.withTransportOptions(options);
7172

java-client/src/test/java/co/elastic/clients/transport/rest5_client/low_level/RequestOptionsTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ public void testSetRequestBuilder() {
139139
RequestConfig.Builder requestConfigBuilder = RequestConfig.custom();
140140
int socketTimeout = 10000;
141141
int connectTimeout = 100;
142-
requestConfigBuilder.setConnectionRequestTimeout(Timeout.ofMilliseconds(socketTimeout)).setConnectTimeout(Timeout.ofMilliseconds(connectTimeout));
142+
requestConfigBuilder.setConnectionRequestTimeout(Timeout.ofMilliseconds(socketTimeout))
143+
.setConnectTimeout(Timeout.ofMilliseconds(connectTimeout));
143144
RequestConfig requestConfig = requestConfigBuilder.build();
144145

145146
builder.setRequestConfig(requestConfig);

java-client/src/test/java/co/elastic/clients/transport/rest5_client/low_level/RestClientSingleHostTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ private static HttpResponse responseOrException(AsyncDataProducer requestProduce
207207
}
208208
}
209209

210-
private static Optional<HttpEntity> retrieveEntity(AsyncDataProducer requestProducer) throws NoSuchFieldException, IllegalAccessException {
210+
private static Optional<HttpEntity> retrieveEntity(AsyncDataProducer requestProducer)
211+
throws NoSuchFieldException, IllegalAccessException {
211212
// entity is in the dataProducer field, both are private
212213
Field dataProducerField = requestProducer.getClass().getDeclaredField("dataProducer");
213214
dataProducerField.setAccessible(true);

java-client/src/test/java/co/elastic/clients/transport/rest5_client/low_level/RestClientTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* not use this file except in compliance with the License.
88
* You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* http://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an

java-client/src/test/java/co/elastic/clients/transport/rest5_client/low_level/RestClientTestUtil.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.ArrayList;
2727
import java.util.Arrays;
2828
import java.util.List;
29-
import java.util.Random;
3029

3130
import static co.elastic.clients.transport.rest5_client.low_level.RestClientTestCase.randomAsciiLettersOfLengthBetween;
3231
import static co.elastic.clients.transport.rest5_client.low_level.RestClientTestCase.randomBoolean;

0 commit comments

Comments
 (0)