Browse Source

Polish

pull/11981/merge
Phillip Webb 8 years ago committed by Stephane Nicoll
parent
commit
af8e155c6d
  1. 2
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfiguration.java
  2. 4
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2RestOperationsConfiguration.java
  3. 17
      spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2RestOperationsConfigurationTests.java
  4. 2
      spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java
  5. 14
      spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeUtils.java
  6. 5
      spring-boot/src/main/java/org/springframework/boot/jdbc/DatabaseDriver.java
  7. 7
      spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java
  8. 2
      spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java

2
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfiguration.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

4
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2RestOperationsConfiguration.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -87,7 +87,7 @@ public class OAuth2RestOperationsConfiguration { @@ -87,7 +87,7 @@ public class OAuth2RestOperationsConfiguration {
@Configuration
@ConditionalOnBean(OAuth2ClientConfiguration.class)
@Conditional({OAuth2ClientIdCondition.class, NoClientCredentialsCondition.class})
@Conditional({ OAuth2ClientIdCondition.class, NoClientCredentialsCondition.class })
@Import(OAuth2ProtectedResourceDetailsConfiguration.class)
protected static class SessionScopedConfiguration {

17
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2RestOperationsConfigurationTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -78,8 +78,7 @@ public class OAuth2RestOperationsConfigurationTests { @@ -78,8 +78,7 @@ public class OAuth2RestOperationsConfigurationTests {
EnvironmentTestUtils.addEnvironment(this.environment,
"security.oauth2.client.client-id=acme");
initializeContext(ConfigForRequestScopedConfiguration.class, false);
assertThat(this.context.containsBean("oauth2ClientContext"))
.isTrue();
assertThat(this.context.containsBean("oauth2ClientContext")).isTrue();
}
@Test
@ -95,8 +94,7 @@ public class OAuth2RestOperationsConfigurationTests { @@ -95,8 +94,7 @@ public class OAuth2RestOperationsConfigurationTests {
EnvironmentTestUtils.addEnvironment(this.environment,
"security.oauth2.client.client-id=acme");
initializeContext(ConfigForSessionScopedConfiguration.class, false);
assertThat(this.context.containsBean("oauth2ClientContext"))
.isTrue();
assertThat(this.context.containsBean("oauth2ClientContext")).isTrue();
}
@Test
@ -109,8 +107,7 @@ public class OAuth2RestOperationsConfigurationTests { @@ -109,8 +107,7 @@ public class OAuth2RestOperationsConfigurationTests {
private void initializeContext(Class<?> configuration, boolean isClientCredentials) {
this.context = new SpringApplicationBuilder(configuration)
.environment(this.environment)
.web(!isClientCredentials).run();
.environment(this.environment).web(!isClientCredentials).run();
}
@Configuration
@ -126,7 +123,8 @@ public class OAuth2RestOperationsConfigurationTests { @@ -126,7 +123,8 @@ public class OAuth2RestOperationsConfigurationTests {
@Configuration
@Import({ OAuth2ClientConfiguration.class, OAuth2RestOperationsConfiguration.class })
protected static class ConfigForSessionScopedConfiguration extends WebApplicationConfiguration {
protected static class ConfigForSessionScopedConfiguration
extends WebApplicationConfiguration {
@Bean
public SecurityProperties securityProperties() {
@ -136,7 +134,8 @@ public class OAuth2RestOperationsConfigurationTests { @@ -136,7 +134,8 @@ public class OAuth2RestOperationsConfigurationTests {
}
@Configuration
protected static class ConfigForRequestScopedConfiguration extends WebApplicationConfiguration {
protected static class ConfigForRequestScopedConfiguration
extends WebApplicationConfiguration {
}

2
spring-boot-integration-tests/spring-boot-launch-script-tests/src/test/java/org/springframework/boot/launchscript/SysVinitLaunchScriptIT.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

14
spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/TypeUtils.java

@ -188,17 +188,15 @@ class TypeUtils { @@ -188,17 +188,15 @@ class TypeUtils {
+ type.asElement().getSimpleName().toString();
}
String qualifiedName = getQualifiedName(type.asElement());
if (type.getTypeArguments().isEmpty()) {
if (type.getTypeArguments().isEmpty()) {
return qualifiedName;
}
else {
StringBuilder name = new StringBuilder();
name.append(qualifiedName);
if (!type.getTypeArguments().isEmpty()) {
appendTypeArguments(type, name);
}
return name.toString();
StringBuilder name = new StringBuilder();
name.append(qualifiedName);
if (!type.getTypeArguments().isEmpty()) {
appendTypeArguments(type, name);
}
return name.toString();
}
private void appendTypeArguments(DeclaredType type, StringBuilder name) {

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -123,8 +123,7 @@ public enum DatabaseDriver { @@ -123,8 +123,7 @@ public enum DatabaseDriver {
* Firebird.
*/
FIREBIRD("Firebird", "org.firebirdsql.jdbc.FBDriver",
"org.firebirdsql.ds.FBXADataSource",
"SELECT 1 FROM RDB$DATABASE") {
"org.firebirdsql.ds.FBXADataSource", "SELECT 1 FROM RDB$DATABASE") {
@Override
protected Collection<String> getUrlPrefixes() {

7
spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -337,8 +337,9 @@ public class RestTemplateBuilder { @@ -337,8 +337,9 @@ public class RestTemplateBuilder {
/**
* Set the {@link ClientHttpRequestFactory} that should be used with the
* {@link RestTemplate}.
* <p>Note that this request factory will be shared with all builder instances
* derived from that point.
* <p>
* Note that this request factory will be shared with all builder instances derived
* from that point.
* @param requestFactory the request factory to use
* @return a new builder instance
*/

2
spring-boot/src/test/java/org/springframework/boot/context/embedded/jetty/JettyEmbeddedServletContainerFactoryTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

Loading…
Cancel
Save