File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
smoke-test/spring-boot-smoke-test-restclient/src
test/java/smoketest/restclient Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 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+
117package aaaa ;
218
319import 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+ }
Original file line number Diff line number Diff line change 1717package smoketest .restclient ;
1818
1919import java .util .List ;
20+ import java .util .Objects ;
2021
2122import org .junit .jupiter .api .Test ;
2223import 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 ()
You can’t perform that action at this time.
0 commit comments