Skip to content

Commit a20046f

Browse files
committed
Merge pull request #14667 from izeye
* pr/14667: Polish contribution Polish
2 parents b4a8ad0 + 0eae323 commit a20046f

File tree

8 files changed

+25
-26
lines changed

8 files changed

+25
-26
lines changed

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/reactive/server/WebFluxTags.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ public static Tag exception(Throwable exception) {
128128
}
129129

130130
/**
131-
* Creates a {@code outcome} tag based on the response status of the given
131+
* Creates an {@code outcome} tag based on the response status of the given
132132
* {@code exchange}.
133133
* @param exchange the exchange
134134
* @return the outcome tag derived from the response status
135+
* @since 2.1.0
135136
*/
136137
public static Tag outcome(ServerWebExchange exchange) {
137138
HttpStatus status = exchange.getResponse().getStatusCode();

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/metrics/web/servlet/WebMvcTags.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ public static Tag exception(Throwable exception) {
165165
}
166166

167167
/**
168-
* Creates a {@code outcome} tag based on the status of the given {@code response}.
168+
* Creates an {@code outcome} tag based on the status of the given {@code response}.
169169
* @param response the HTTP response
170170
* @return the outcome tag derived from the status of the response
171+
* @since 2.1.0
171172
*/
172173
public static Tag outcome(HttpServletResponse response) {
173174
if (response != null) {
@@ -181,7 +182,7 @@ public static Tag outcome(HttpServletResponse response) {
181182
if (status < 400) {
182183
return OUTCOME_REDIRECTION;
183184
}
184-
else if (status < 500) {
185+
if (status < 500) {
185186
return OUTCOME_CLIENT_ERROR;
186187
}
187188
return OUTCOME_SERVER_ERROR;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/neo4j/Neo4jDataAutoConfigurationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public void eventListenersAreAutoRegistered() {
156156
}
157157

158158
@Test
159-
public void providesARequestScopedBookmarkManangerIfNecessaryAndPossible() {
159+
public void providesARequestScopedBookmarkManagerIfNecessaryAndPossible() {
160160
this.contextRunner
161161
.withUserConfiguration(BookmarkManagementEnabledConfiguration.class)
162162
.run((context) -> {
@@ -168,7 +168,7 @@ public void providesARequestScopedBookmarkManangerIfNecessaryAndPossible() {
168168
}
169169

170170
@Test
171-
public void providesASingletonScopedBookmarkManangerIfNecessaryAndPossible() {
171+
public void providesASingletonScopedBookmarkManagerIfNecessaryAndPossible() {
172172
new ApplicationContextRunner()
173173
.withUserConfiguration(TestConfiguration.class,
174174
BookmarkManagementEnabledConfiguration.class)

spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/ClassLoaderFilesResourcePatternResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ private List<Resource> getAdditionalResources(String locationPattern)
130130
for (Entry<String, ClassLoaderFile> entry : sourceFolder.getFilesEntrySet()) {
131131
String name = entry.getKey();
132132
ClassLoaderFile file = entry.getValue();
133-
if (entry.getValue().getKind() != Kind.DELETED
133+
if (file.getKind() != Kind.DELETED
134134
&& this.antPathMatcher.match(trimmedLocationPattern, name)) {
135135
URL url = new URL("reloaded", null, -1, "/" + name,
136136
new ClassLoaderFileURLStreamHandler(file));

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ repositories {
2222

2323
dependencies {
2424
implementation localGroovy()
25-
implementation gradleApi()
26-
implementation fileTree(dir: 'target/dependencies/compile', include: '*.jar')
25+
implementation gradleApi()
26+
implementation fileTree(dir: 'target/dependencies/compile', include: '*.jar')
2727
testImplementation gradleTestKit()
28-
testImplementation 'org.apache.commons:commons-compress:1.13'
29-
testImplementation fileTree(dir: 'target/dependencies/test', include: '*.jar')
28+
testImplementation 'org.apache.commons:commons-compress:1.13'
29+
testImplementation fileTree(dir: 'target/dependencies/test', include: '*.jar')
3030
}
3131

3232
jar {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/BindConverter.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,15 @@ public <T> T convert(Object value, ResolvableType type, Annotation... annotation
9999
new ResolvableTypeDescriptor(type, annotations));
100100
}
101101

102-
public static BindConverter get(ConversionService conversionService,
102+
static BindConverter get(ConversionService conversionService,
103103
Consumer<PropertyEditorRegistry> propertyEditorInitializer) {
104104
if (conversionService == ApplicationConversionService.getSharedInstance()
105105
&& propertyEditorInitializer == null) {
106-
BindConverter instance = sharedInstance;
107-
if (instance == null) {
108-
instance = new BindConverter(conversionService,
106+
if (sharedInstance == null) {
107+
sharedInstance = new BindConverter(conversionService,
109108
propertyEditorInitializer);
110-
sharedInstance = instance;
111109
}
112-
return instance;
110+
return sharedInstance;
113111
}
114112
return new BindConverter(conversionService, propertyEditorInitializer);
115113
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public String getId() {
101101

102102
/**
103103
* SAP - SAP Hana Database - HDB.
104+
* @since 2.1.0
104105
*/
105106
SAP("HDB", "com.sap.db.jdbc.Driver", "com.sap.db.jdbcext.XADataSourceSAP",
106107
"SELECT 1 FROM DUMMY"),

spring-boot-tests/spring-boot-integration-tests/spring-boot-devtools-tests/src/test/java/org/springframework/boot/devtools/tests/DevToolsIntegrationTests.java

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2017 the original author or authors.
2+
* Copyright 2012-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -161,15 +161,13 @@ public void createAControllerAndThenAddARequestMappingToAnExistingController()
161161
String.class)).isEqualTo("two");
162162
controller("com.example.ControllerOne").withRequestMapping("one")
163163
.withRequestMapping("three").build();
164-
int port = awaitServerPort();
165-
assertThat(
166-
template.getForObject("http://localhost:" + port + "/one", String.class))
167-
.isEqualTo("one");
168-
assertThat(
169-
template.getForObject("http://localhost:" + port + "/two", String.class))
170-
.isEqualTo("two");
171-
assertThat(template.getForObject("http://localhost:" + port + "/three",
172-
String.class)).isEqualTo("three");
164+
urlBase = "http://localhost:" + awaitServerPort();
165+
assertThat(template.getForObject(urlBase + "/one", String.class))
166+
.isEqualTo("one");
167+
assertThat(template.getForObject(urlBase + "/two", String.class))
168+
.isEqualTo("two");
169+
assertThat(template.getForObject(urlBase + "/three", String.class))
170+
.isEqualTo("three");
173171
}
174172

175173
@Test

0 commit comments

Comments
 (0)