Skip to content

Commit e9f78f0

Browse files
author
Andreas Höhmann
committed
fix: some compiler issues after rebase
1 parent 4c46644 commit e9f78f0

File tree

6 files changed

+24
-38
lines changed

6 files changed

+24
-38
lines changed

spring-boot-admin-client/pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,6 @@
5454
<artifactId>spring-boot-webclient</artifactId>
5555
<optional>true</optional>
5656
</dependency>
57-
<dependency>
58-
<groupId>org.springframework.boot</groupId>
59-
<artifactId>spring-boot-restclient</artifactId>
60-
<optional>true</optional>
61-
</dependency>
62-
<dependency>
63-
<groupId>org.springframework.boot</groupId>
64-
<artifactId>spring-boot-webclient</artifactId>
65-
<optional>true</optional>
66-
</dependency>
6757
<dependency>
6858
<groupId>org.springframework.boot</groupId>
6959
<artifactId>spring-boot-starter-web</artifactId>
@@ -74,11 +64,6 @@
7464
<artifactId>spring-boot-starter-webflux</artifactId>
7565
<optional>true</optional>
7666
</dependency>
77-
<dependency>
78-
<groupId>org.springframework.boot</groupId>
79-
<artifactId>spring-boot-starter-webflux</artifactId>
80-
<optional>true</optional>
81-
</dependency>
8267
<dependency>
8368
<groupId>org.springframework.boot</groupId>
8469
<artifactId>spring-boot-autoconfigure-processor</artifactId>

spring-boot-admin-client/src/test/java/de/codecentric/boot/admin/client/AbstractClientApplicationTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package de.codecentric.boot.admin.client;
1818

1919
import java.net.InetAddress;
20+
import java.time.Duration;
2021
import java.util.Arrays;
2122
import java.util.concurrent.CountDownLatch;
2223
import java.util.concurrent.TimeUnit;

spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/web/reactive/AdminControllerHandlerMapping.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import org.springframework.core.annotation.AnnotatedElementUtils;
2222
import org.springframework.util.StringUtils;
23-
import org.springframework.web.bind.annotation.RequestMethod;
2423
import org.springframework.web.reactive.result.condition.PatternsRequestCondition;
2524
import org.springframework.web.reactive.result.method.RequestMappingInfo;
2625
import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping;
@@ -47,7 +46,7 @@ protected void registerHandlerMethod(Object handler, Method method, RequestMappi
4746
}
4847

4948
private RequestMappingInfo withPrefix(RequestMappingInfo mapping) {
50-
if (!StringUtils.hasText(adminContextPath)) {
49+
if (!StringUtils.hasText(this.adminContextPath)) {
5150
return mapping;
5251
}
5352
return mapping.mutate().paths(withNewPatterns(mapping.getPatternsCondition())).build();
@@ -56,7 +55,7 @@ private RequestMappingInfo withPrefix(RequestMappingInfo mapping) {
5655
private String[] withNewPatterns(PatternsRequestCondition patternsRequestCondition) {
5756
return patternsRequestCondition.getPatterns()
5857
.stream()
59-
.map((pattern) -> PathUtils.normalizePath(adminContextPath + pattern))
58+
.map((pattern) -> PathUtils.normalizePath(this.adminContextPath + pattern))
6059
.toArray(String[]::new);
6160
}
6261

spring-boot-admin-server/src/test/java/de/codecentric/boot/admin/server/notify/HipchatNotifierTest.java

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ class HipchatNotifierTest {
5757
@BeforeEach
5858
void setUp() {
5959
InstanceRepository repository = mock(InstanceRepository.class);
60-
when(repository.find(instance.getId())).thenReturn(Mono.just(instance));
61-
62-
restTemplate = mock(RestTemplate.class);
63-
notifier = new HipchatNotifier(repository, restTemplate);
64-
notifier.setNotify(true);
65-
notifier.setAuthToken("--token-");
66-
notifier.setRoomId("-room-");
67-
notifier.setUrl(URI.create("http://localhost/v2"));
60+
when(repository.find(this.instance.getId())).thenReturn(Mono.just(this.instance));
61+
62+
this.restTemplate = mock(RestTemplate.class);
63+
this.notifier = new HipchatNotifier(repository, this.restTemplate);
64+
this.notifier.setNotify(true);
65+
this.notifier.setAuthToken("--token-");
66+
this.notifier.setRoomId("-room-");
67+
this.notifier.setUrl(URI.create("http://localhost/v2"));
6868
}
6969

7070
@Test
@@ -73,20 +73,20 @@ void test_onApplicationEvent_resolve() {
7373
ArgumentCaptor<HttpEntity<Map<String, Object>>> httpRequest = ArgumentCaptor
7474
.forClass((Class<HttpEntity<Map<String, Object>>>) (Class<?>) HttpEntity.class);
7575

76-
when(restTemplate.postForEntity(isA(String.class), httpRequest.capture(), eq(Void.class)))
76+
when(this.restTemplate.postForEntity(isA(String.class), httpRequest.capture(), eq(Void.class)))
7777
.thenReturn(ResponseEntity.ok().build());
7878

7979
StepVerifier
80-
.create(notifier
81-
.notify(new InstanceStatusChangedEvent(instance.getId(), instance.getVersion(), StatusInfo.ofDown())))
80+
.create(this.notifier.notify(new InstanceStatusChangedEvent(this.instance.getId(),
81+
this.instance.getVersion(), StatusInfo.ofDown())))
8282
.verifyComplete();
8383
StepVerifier
84-
.create(notifier
85-
.notify(new InstanceStatusChangedEvent(instance.getId(), instance.getVersion(), StatusInfo.ofUp())))
84+
.create(this.notifier.notify(new InstanceStatusChangedEvent(this.instance.getId(),
85+
this.instance.getVersion(), StatusInfo.ofUp())))
8686
.verifyComplete();
8787

8888
assertThat(httpRequest.getValue().getHeaders().asMultiValueMap()).containsEntry("Content-Type",
89-
.containsAll(Collections.singletonList("application/json"));
89+
Collections.singletonList("application/json"));
9090

9191
Map<String, Object> body = httpRequest.getValue().getBody();
9292
assertThat(body).containsEntry("color", "green");
@@ -104,15 +104,16 @@ void test_onApplicationEvent_trigger() {
104104
ArgumentCaptor<HttpEntity<Map<String, Object>>> httpRequest = ArgumentCaptor
105105
.forClass((Class<HttpEntity<Map<String, Object>>>) (Class<?>) HttpEntity.class);
106106

107-
when(restTemplate.postForEntity(isA(String.class), httpRequest.capture(), eq(Void.class)))
107+
when(this.restTemplate.postForEntity(isA(String.class), httpRequest.capture(), eq(Void.class)))
108108
.thenReturn(ResponseEntity.ok().build());
109109

110110
StepVerifier
111-
.create(notifier
112-
.notify(new InstanceStatusChangedEvent(instance.getId(), instance.getVersion(), StatusInfo.ofUp())))
111+
.create(this.notifier.notify(new InstanceStatusChangedEvent(this.instance.getId(),
112+
this.instance.getVersion(), StatusInfo.ofUp())))
113113
.verifyComplete();
114114
StepVerifier
115-
.create(notifier.notify(new InstanceStatusChangedEvent(instance.getId(), instance.getVersion(), infoDown)))
115+
.create(this.notifier
116+
.notify(new InstanceStatusChangedEvent(this.instance.getId(), this.instance.getVersion(), infoDown)))
116117
.verifyComplete();
117118

118119
assertThat(httpRequest.getValue().getHeaders().toSingleValueMap()).containsEntry("Content-Type",

spring-boot-admin-server/src/test/java/de/codecentric/boot/admin/server/web/client/CompositeHttpHeadersProviderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void should_return_all_headers() {
4141
}));
4242

4343
HttpHeaders headers = provider.getHeaders(null);
44-
assertThat(headers.asMultiValueMap()).containsEntry("a", singletonList("1"))
44+
assertThat(headers.asMultiValueMap()).containsEntry("a", singletonList("1"));
4545
assertThat(headers.get("b")).containsAll(asList("2-a", "2-b"));
4646
assertThat(headers.get("c")).containsAll(singletonList("3"));
4747
}

spring-boot-admin-server/src/test/java/de/codecentric/boot/admin/server/web/client/reactive/CompositeReactiveHttpHeadersProviderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void should_return_all_headers() {
4343
}));
4444

4545
StepVerifier.create(provider.getHeaders(null)).thenConsumeWhile((headers) -> {
46-
assertThat(headers.asMultiValueMap()).containsEntry("a", singletonList("1"))
46+
assertThat(headers.asMultiValueMap()).containsEntry("a", singletonList("1"));
4747
assertThat(headers.get("b")).containsAll(asList("2-a", "2-b"));
4848
assertThat(headers.get("c")).containsAll(singletonList("3"));
4949
return true;

0 commit comments

Comments
 (0)