Skip to content

Commit 1916784

Browse files
committed
Merge branch '4.0.x'
2 parents b0f9cee + f415619 commit 1916784

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
1+
/*
2+
* Copyright 2012-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package aaaa;
218

319
import org.springframework.boot.autoconfigure.AutoConfiguration;
420

521
@AutoConfiguration(afterName = { "org.springframework.boot.restclient.autoconfigure.RestClientAutoConfiguration",
622
"org.springframework.boot.restclient.autoconfigure.RestTemplateAutoConfiguration" })
7-
class Gh49223AutoConfiguration {
23+
public final class Gh49223AutoConfiguration {
824

925
// Class must be in a package name that is ordered early
1026

11-
}
27+
}

smoke-test/spring-boot-smoke-test-restclient/src/test/java/smoketest/restclient/SampleRestClientApplicationGh49223Tests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package smoketest.restclient;
1818

1919
import java.util.List;
20+
import java.util.Objects;
2021

2122
import org.junit.jupiter.api.Test;
2223
import tools.jackson.databind.DeserializationFeature;
@@ -38,7 +39,8 @@ class SampleRestClientApplicationGh49223Tests {
3839
@Test
3940
void applicationStarts() {
4041
RestClient restClient = this.restClientBuilder.build();
41-
List<?> messageConverters = (List<?>) ReflectionTestUtils.getField(restClient, "messageConverters");
42+
List<?> messageConverters = (List<?>) Objects
43+
.requireNonNull(ReflectionTestUtils.getField(restClient, "messageConverters"));
4244
JacksonJsonHttpMessageConverter jacksonConverter = (JacksonJsonHttpMessageConverter) messageConverters.stream()
4345
.filter((converter) -> converter instanceof JacksonJsonHttpMessageConverter)
4446
.findFirst()

0 commit comments

Comments
 (0)