Skip to content

Commit 3e18213

Browse files
committed
Merge pull request #10636 from izeye:polish-20171014
* pr/10636: Polish
2 parents 0af4536 + 5aa32b3 commit 3e18213

File tree

18 files changed

+28
-39
lines changed

18 files changed

+28
-39
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/EndpointEnablementProviderTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public void defaultEnablementNeutralWithGeneralDisablement() {
153153
}
154154

155155
@Test
156-
public void defaultEnablementNeutralWebWithTechDisablement() {
156+
public void defaultEnablementNeutralJmxWithTechDisablement() {
157157
EndpointEnablement enablement = getEndpointEnablement("biz",
158158
DefaultEnablement.NEUTRAL, EndpointExposure.JMX,
159159
"endpoints.default.jmx.enabled=false");
@@ -177,7 +177,7 @@ public void defaultEnablementNeutralWebWithTechEnablement() {
177177
}
178178

179179
@Test
180-
public void defaultEnablementNeutralWebWithUnrelatedTechDisablement() {
180+
public void defaultEnablementNeutralJmxWithUnrelatedTechDisablement() {
181181
EndpointEnablement enablement = getEndpointEnablement("biz",
182182
DefaultEnablement.NEUTRAL, EndpointExposure.JMX,
183183
"endpoints.default.web.enabled=false");
@@ -235,20 +235,20 @@ public void defaultEnablementNeutralDefaultTechTakesPrecedenceOnGeneralDefault()
235235
}
236236

237237
private EndpointEnablement getEndpointEnablement(String id,
238-
DefaultEnablement enabledByDefault, String... environment) {
239-
return getEndpointEnablement(id, enabledByDefault, null, environment);
238+
DefaultEnablement defaultEnablement, String... environment) {
239+
return getEndpointEnablement(id, defaultEnablement, null, environment);
240240
}
241241

242242
private EndpointEnablement getEndpointEnablement(String id,
243-
DefaultEnablement enabledByDefault, EndpointExposure exposure,
243+
DefaultEnablement defaultEnablement, EndpointExposure exposure,
244244
String... environment) {
245245
MockEnvironment env = new MockEnvironment();
246246
TestPropertyValues.of(environment).applyTo(env);
247247
EndpointEnablementProvider provider = new EndpointEnablementProvider(env);
248248
if (exposure != null) {
249-
return provider.getEndpointEnablement(id, enabledByDefault, exposure);
249+
return provider.getEndpointEnablement(id, defaultEnablement, exposure);
250250
}
251-
return provider.getEndpointEnablement(id, enabledByDefault);
251+
return provider.getEndpointEnablement(id, defaultEnablement);
252252
}
253253

254254
private void validate(EndpointEnablement enablement, boolean enabled,

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void runShouldHaveStatusEndpointBeanEvenIfDefaultIsDisabled() {
8989
}
9090

9191
@Test
92-
public void runWhenEnabledPropertyIsFalseShouldNotHaveEndpointBean()
92+
public void runWhenEnabledPropertyIsFalseShouldNotHaveStatusEndpointBean()
9393
throws Exception {
9494
this.contextRunner.withPropertyValues("endpoints.status.enabled:false").run(
9595
(context) -> assertThat(context).doesNotHaveBean(StatusEndpoint.class));

spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/WebFluxEndpointHandlerMapping.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public WebFluxEndpointHandlerMapping(EndpointMapping endpointMapping,
108108
/**
109109
* Creates a new {@code WebEndpointHandlerMapping} that provides mappings for the
110110
* operations of the given {@code webEndpoints}.
111-
* @param endpointMapping the path beneath which all endpoints should be mapped
111+
* @param endpointMapping the base mapping for all endpoints
112112
* @param webEndpoints the web endpoints
113113
* @param endpointMediaTypes media types consumed and produced by the endpoints
114114
* @param corsConfiguration the CORS configuration for the endpoints

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/annotation/AnnotationEndpointDiscovererTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void endpointIsDiscovered() {
6868
}
6969

7070
@Test
71-
public void endpointIsInParentContextIsDiscovered() {
71+
public void endpointInParentContextIsDiscovered() {
7272
AnnotationConfigApplicationContext parent = new AnnotationConfigApplicationContext(
7373
TestEndpointConfiguration.class);
7474
loadWithParent(parent, EmptyConfiguration.class, hasTestEndpoint());

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientProperties.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public class OAuth2ClientProperties {
3737
/**
3838
* OAuth provider details.
3939
*/
40-
private Map<String, Provider> provider = new HashMap<>();
40+
private final Map<String, Provider> provider = new HashMap<>();
4141

4242
/**
4343
* OAuth client registrations.
4444
*/
45-
private Map<String, Registration> registration = new HashMap<>();
45+
private final Map<String, Registration> registration = new HashMap<>();
4646

4747
public Map<String, Provider> getProvider() {
4848
return this.provider;
@@ -92,28 +92,28 @@ public static class Registration {
9292
private String clientSecret;
9393

9494
/**
95-
* Client authentication method. May be left bank then using a pre-defined
95+
* Client authentication method. May be left blank then using a pre-defined
9696
* provider.
9797
*/
9898
private String clientAuthenticationMethod;
9999

100100
/**
101-
* Authorization grant type. May be left bank then using a pre-defined provider.
101+
* Authorization grant type. May be left blank then using a pre-defined provider.
102102
*/
103103
private String authorizationGrantType;
104104

105105
/**
106-
* Redirect URI. May be left bank then using a pre-defined provider.
106+
* Redirect URI. May be left blank then using a pre-defined provider.
107107
*/
108108
private String redirectUri;
109109

110110
/**
111-
* Authorization scopes. May be left bank then using a pre-defined provider.
111+
* Authorization scopes. May be left blank then using a pre-defined provider.
112112
*/
113113
private Set<String> scope;
114114

115115
/**
116-
* Client name. May be left bank then using a pre-defined provider.
116+
* Client name. May be left blank then using a pre-defined provider.
117117
*/
118118
private String clientName;
119119

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/session/NonUniqueSessionRepositoryFailureAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.springframework.boot.diagnostics.FailureAnalysis;
2121

2222
/**
23-
* A {@link AbstractFailureAnalyzer} for {@link NonUniqueSessionRepositoryException}.
23+
* An {@link AbstractFailureAnalyzer} for {@link NonUniqueSessionRepositoryException}.
2424
*
2525
* @author Stephane Nicoll
2626
*/

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceJmxConfigurationTests.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
import org.apache.tomcat.jdbc.pool.DataSourceProxy;
3030
import org.apache.tomcat.jdbc.pool.jmx.ConnectionPool;
3131
import org.junit.After;
32-
import org.junit.Rule;
3332
import org.junit.Test;
34-
import org.junit.rules.ExpectedException;
3533

3634
import org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration;
3735
import org.springframework.boot.test.util.TestPropertyValues;
@@ -47,9 +45,6 @@
4745
*/
4846
public class DataSourceJmxConfigurationTests {
4947

50-
@Rule
51-
public ExpectedException thrown = ExpectedException.none();
52-
5348
private ConfigurableApplicationContext context;
5449

5550
@After

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mongo/MongoClientFactoryTests.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
import com.mongodb.ServerAddress;
2424
import com.mongodb.connection.Cluster;
2525
import com.mongodb.connection.ClusterSettings;
26-
import org.junit.Rule;
2726
import org.junit.Test;
28-
import org.junit.rules.ExpectedException;
2927

3028
import org.springframework.boot.context.properties.EnableConfigurationProperties;
3129
import org.springframework.context.annotation.Configuration;
@@ -45,9 +43,6 @@
4543
*/
4644
public class MongoClientFactoryTests {
4745

48-
@Rule
49-
public ExpectedException thrown = ExpectedException.none();
50-
5146
private MockEnvironment environment = new MockEnvironment();
5247

5348
@Test

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2ClientPropertiesRegistrationAdapterTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void getClientRegistrationsWhenUsingDefinedProviderShouldAdapt()
4848
provider.setAuthorizationUri("http://example.com/auth");
4949
provider.setTokenUri("http://example.com/token");
5050
provider.setUserInfoUri("http://example.com/info");
51-
provider.setJwkSetUri("http://example.com/jkw");
51+
provider.setJwkSetUri("http://example.com/jwk");
5252
Registration registration = new Registration();
5353
registration.setProvider("provider");
5454
registration.setClientId("clientId");
@@ -69,7 +69,7 @@ public void getClientRegistrationsWhenUsingDefinedProviderShouldAdapt()
6969
assertThat(adaptedProvider.getTokenUri()).isEqualTo("http://example.com/token");
7070
assertThat(adaptedProvider.getUserInfoEndpoint().getUri())
7171
.isEqualTo("http://example.com/info");
72-
assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("http://example.com/jkw");
72+
assertThat(adaptedProvider.getJwkSetUri()).isEqualTo("http://example.com/jwk");
7373
assertThat(adapted.getRegistrationId()).isEqualTo("registration");
7474
assertThat(adapted.getClientId()).isEqualTo("clientId");
7575
assertThat(adapted.getClientSecret()).isEqualTo("clientSecret");

spring-boot-project/spring-boot-docs/src/main/asciidoc/documentation-overview.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ When you're ready to push your Spring Boot application to production, we've got
123123
<<production-ready-features.adoc#production-ready-customizing-endpoints, Customization>>
124124
* *Connection options:*
125125
<<production-ready-features.adoc#production-ready-monitoring, HTTP>> |
126-
<<production-ready-features.adoc#production-ready-jmx, JMX>> |
126+
<<production-ready-features.adoc#production-ready-jmx, JMX>>
127127
* *Monitoring:*
128128
<<production-ready-features.adoc#production-ready-metrics, Metrics>> |
129129
<<production-ready-features.adoc#production-ready-auditing, Auditing>> |

0 commit comments

Comments
 (0)