File tree 2 files changed +5
-4
lines changed
main/java/io/fabric8/kubernetes/client/vertx
test/java/io/fabric8/kubernetes/client/vertx
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 32
32
33
33
import java .io .InputStream ;
34
34
import java .nio .ByteBuffer ;
35
+ import java .util .Collections ;
35
36
import java .util .LinkedHashMap ;
36
37
import java .util .List ;
37
38
import java .util .Map ;
@@ -112,7 +113,7 @@ public void cancel() {
112
113
};
113
114
resp .handler (buffer -> {
114
115
try {
115
- consumer .consume (List . of (ByteBuffer .wrap (buffer .getBytes ())), result );
116
+ consumer .consume (Collections . singletonList (ByteBuffer .wrap (buffer .getBytes ())), result );
116
117
} catch (Exception e ) {
117
118
resp .request ().reset ();
118
119
result .done ().completeExceptionally (e );
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ void testZeroTimeouts() {
34
34
HttpClient .Builder builder = factory .newBuilder ();
35
35
36
36
// should build and be usable without an issue
37
- try (HttpClient client = builder .connectTimeout (0 , TimeUnit .MILLISECONDS ).build (); ) {
37
+ try (HttpClient client = builder .connectTimeout (0 , TimeUnit .MILLISECONDS ).build ()) {
38
38
assertNotNull (client .newHttpRequestBuilder ().uri ("http://localhost" ).build ());
39
39
}
40
40
}
@@ -65,7 +65,7 @@ void createsVertxInstanceWhenNoSharedVertx() {
65
65
@ Test
66
66
void doesntCloseSharedVertxInstanceWhenClientIsClosed () {
67
67
final Vertx vertx = Vertx .vertx ();
68
- final var builder = new VertxHttpClientFactory (vertx ).newBuilder ();
68
+ final VertxHttpClientBuilder < VertxHttpClientFactory > builder = new VertxHttpClientFactory (vertx ).newBuilder ();
69
69
builder .build ().close ();
70
70
assertThat (builder .vertx )
71
71
.asInstanceOf (InstanceOfAssertFactories .type (VertxImpl .class ))
@@ -75,7 +75,7 @@ void doesntCloseSharedVertxInstanceWhenClientIsClosed() {
75
75
76
76
@ Test
77
77
void closesVertxInstanceWhenClientIsClosed () {
78
- final var builder = new VertxHttpClientFactory ().newBuilder ();
78
+ final VertxHttpClientBuilder < VertxHttpClientFactory > builder = new VertxHttpClientFactory ().newBuilder ();
79
79
builder .build ().close ();
80
80
assertThat (builder .vertx )
81
81
.asInstanceOf (InstanceOfAssertFactories .type (VertxImpl .class ))
You can’t perform that action at this time.
0 commit comments