Commit 3cead769 authored by Johnny Lim's avatar Johnny Lim Committed by Stephane Nicoll

Polish

Closes gh-11871
parent 71e9db01
...@@ -27,7 +27,7 @@ import org.springframework.boot.actuate.endpoint.web.ExposableServletEndpoint; ...@@ -27,7 +27,7 @@ import org.springframework.boot.actuate.endpoint.web.ExposableServletEndpoint;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
* A discovered {@link ExposableServletEndpoint controller endpoint}. * A discovered {@link ExposableServletEndpoint servlet endpoint}.
* *
* @author Phillip Webb * @author Phillip Webb
*/ */
......
...@@ -19,9 +19,7 @@ package org.springframework.boot.autoconfigure.security.servlet; ...@@ -19,9 +19,7 @@ package org.springframework.boot.autoconfigure.security.servlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import org.assertj.core.api.AssertDelegateTarget; import org.assertj.core.api.AssertDelegateTarget;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
...@@ -39,9 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat; ...@@ -39,9 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat;
*/ */
public class PathRequestTests { public class PathRequestTests {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test @Test
public void toStaticResourcesShouldReturnStaticResourceRequest() { public void toStaticResourcesShouldReturnStaticResourceRequest() {
assertThat(PathRequest.toStaticResources()) assertThat(PathRequest.toStaticResources())
......
...@@ -322,8 +322,7 @@ and the following command: ...@@ -322,8 +322,7 @@ and the following command:
This is one of the easiest ways to get to AWS, but there are more things to cover, such as This is one of the easiest ways to get to AWS, but there are more things to cover, such as
how to integrate Elastic Beanstalk into any CI / CD tool, use the Elastic Beanstalk Maven how to integrate Elastic Beanstalk into any CI / CD tool, use the Elastic Beanstalk Maven
plugin instead of the CLI, and others. There is a plugin instead of the CLI, and others. There is a
https://exampledriven.wordpress.com/2017/01/09/spring-boot-aws-elastic-beanstalk-example/ https://exampledriven.wordpress.com/2017/01/09/spring-boot-aws-elastic-beanstalk-example/[blog post] covering these topics more in detail.
[blog post] covering these topics more in detail.
...@@ -348,13 +347,11 @@ the following: ...@@ -348,13 +347,11 @@ the following:
---- ----
See the https://boxfuse.com/docs/commandline/run.html[`boxfuse run` documentation] for See the https://boxfuse.com/docs/commandline/run.html[`boxfuse run` documentation] for
more options. If there is a https://boxfuse.com/docs/commandline/#configuration more options. If there is a https://boxfuse.com/docs/commandline/#configuration[`boxfuse.conf`] file present in the current directory, it is considered.
[`boxfuse.conf`] file present in the current directory, it is considered.
TIP: By default, Boxfuse activates a Spring profile named `boxfuse` on startup. If your TIP: By default, Boxfuse activates a Spring profile named `boxfuse` on startup. If your
executable jar or war contains an executable jar or war contains an
https://boxfuse.com/docs/payloads/springboot.html#configuration https://boxfuse.com/docs/payloads/springboot.html#configuration[`application-boxfuse.properties`] file, Boxfuse bases its configuration on the
[`application-boxfuse.properties`] file, Boxfuse bases its configuration on the
properties it contains. properties it contains.
At this point, `boxfuse` creates an image for your application, uploads it, and configures At this point, `boxfuse` creates an image for your application, uploads it, and configures
......
...@@ -1372,7 +1372,7 @@ include::{code-examples}/web/client/RestTemplateProxyCustomizationExample.java[t ...@@ -1372,7 +1372,7 @@ include::{code-examples}/web/client/RestTemplateProxyCustomizationExample.java[t
Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which Spring Boot has no mandatory logging dependency, except for the Commons Logging API, which
is typically provided by Spring Framework's `spring-jcl` module. To use is typically provided by Spring Framework's `spring-jcl` module. To use
http://logback.qos.ch[Logback], you need to include it and `sprign-jcl` on the classpath. http://logback.qos.ch[Logback], you need to include it and `spring-jcl` on the classpath.
The simplest way to do that is through the starters, which all depend on The simplest way to do that is through the starters, which all depend on
`spring-boot-starter-logging`. For a web application, you need only `spring-boot-starter-logging`. For a web application, you need only
`spring-boot-starter-web`, since it depends transitively on the logging starter. If you `spring-boot-starter-web`, since it depends transitively on the logging starter. If you
......
...@@ -170,7 +170,7 @@ class TypeUtils { ...@@ -170,7 +170,7 @@ class TypeUtils {
} }
/** /**
* A visitor that extracts the full qualified name of a type, including generic * A visitor that extracts the fully qualified name of a type, including generic
* information. * information.
*/ */
private static class TypeExtractor extends SimpleTypeVisitor8<String, Void> { private static class TypeExtractor extends SimpleTypeVisitor8<String, Void> {
...@@ -186,7 +186,7 @@ class TypeUtils { ...@@ -186,7 +186,7 @@ class TypeUtils {
TypeElement enclosingElement = getEnclosingTypeElement(type); TypeElement enclosingElement = getEnclosingTypeElement(type);
if (enclosingElement != null) { if (enclosingElement != null) {
return getQualifiedName(enclosingElement) + "$" return getQualifiedName(enclosingElement) + "$"
+ type.asElement().getSimpleName().toString(); + type.asElement().getSimpleName();
} }
String qualifiedName = getQualifiedName(type.asElement()); String qualifiedName = getQualifiedName(type.asElement());
if (type.getTypeArguments().isEmpty()) { if (type.getTypeArguments().isEmpty()) {
...@@ -217,8 +217,7 @@ class TypeUtils { ...@@ -217,8 +217,7 @@ class TypeUtils {
TypeElement enclosingElement = getEnclosingTypeElement(element.asType()); TypeElement enclosingElement = getEnclosingTypeElement(element.asType());
if (enclosingElement != null) { if (enclosingElement != null) {
return getQualifiedName(enclosingElement) + "$" return getQualifiedName(enclosingElement) + "$"
+ ((DeclaredType) element.asType()).asElement().getSimpleName() + ((DeclaredType) element.asType()).asElement().getSimpleName();
.toString();
} }
if (element instanceof TypeElement) { if (element instanceof TypeElement) {
return ((TypeElement) element).getQualifiedName().toString(); return ((TypeElement) element).getQualifiedName().toString();
......
...@@ -33,7 +33,7 @@ plugin: ...@@ -33,7 +33,7 @@ plugin:
When {kotlin-plugin}[Kotlin's Gradle plugin] is applied to a project, the Spring Boot When {kotlin-plugin}[Kotlin's Gradle plugin] is applied to a project, the Spring Boot
plugin: plugin:
1. Aligns the Koltin version used in Spring Boot's dependency management with the version 1. Aligns the Kotlin version used in Spring Boot's dependency management with the version
of the plugin. This is achieved by setting the `kotlin.version` property with a value of the plugin. This is achieved by setting the `kotlin.version` property with a value
that matches the version of the Kotlin plugin. that matches the version of the Kotlin plugin.
......
...@@ -165,7 +165,7 @@ public final class LambdaSafe { ...@@ -165,7 +165,7 @@ public final class LambdaSafe {
if (!isLambdaGenericProblem(ex)) { if (!isLambdaGenericProblem(ex)) {
throw ex; throw ex;
} }
logNonMachingType(callbackInstance, ex); logNonMatchingType(callbackInstance, ex);
} }
} }
return InvocationResult.noResult(); return InvocationResult.noResult();
...@@ -202,7 +202,7 @@ public final class LambdaSafe { ...@@ -202,7 +202,7 @@ public final class LambdaSafe {
return false; return false;
} }
private void logNonMachingType(C callback, ClassCastException ex) { private void logNonMatchingType(C callback, ClassCastException ex) {
if (this.logger.isDebugEnabled()) { if (this.logger.isDebugEnabled()) {
Class<?> expectedType = ResolvableType.forClass(this.callbackType) Class<?> expectedType = ResolvableType.forClass(this.callbackType)
.resolveGeneric(); .resolveGeneric();
......
...@@ -59,7 +59,7 @@ public class LiquibaseServiceLocatorApplicationListenerTests { ...@@ -59,7 +59,7 @@ public class LiquibaseServiceLocatorApplicationListenerTests {
SpringApplication application = new SpringApplication(Conf.class); SpringApplication application = new SpringApplication(Conf.class);
application.setWebApplicationType(WebApplicationType.NONE); application.setWebApplicationType(WebApplicationType.NONE);
this.context = application.run(); this.context = application.run();
Object resolver = getServiceLocator(); Object resolver = getClassResolver();
assertThat(resolver).isInstanceOf(SpringPackageScanClassResolver.class); assertThat(resolver).isInstanceOf(SpringPackageScanClassResolver.class);
} }
...@@ -73,11 +73,11 @@ public class LiquibaseServiceLocatorApplicationListenerTests { ...@@ -73,11 +73,11 @@ public class LiquibaseServiceLocatorApplicationListenerTests {
new ClassHidingClassLoader(CustomResolverServiceLocator.class)); new ClassHidingClassLoader(CustomResolverServiceLocator.class));
application.setResourceLoader(resourceLoader); application.setResourceLoader(resourceLoader);
this.context = application.run(); this.context = application.run();
Object resolver = getServiceLocator(); Object resolver = getClassResolver();
assertThat(resolver).isInstanceOf(DefaultPackageScanClassResolver.class); assertThat(resolver).isInstanceOf(DefaultPackageScanClassResolver.class);
} }
private Object getServiceLocator() throws IllegalAccessException { private Object getClassResolver() throws IllegalAccessException {
ServiceLocator instance = ServiceLocator.getInstance(); ServiceLocator instance = ServiceLocator.getInstance();
Field field = ReflectionUtils.findField(ServiceLocator.class, "classResolver"); Field field = ReflectionUtils.findField(ServiceLocator.class, "classResolver");
field.setAccessible(true); field.setAccessible(true);
......
...@@ -442,7 +442,7 @@ public class LambdaSafeTests { ...@@ -442,7 +442,7 @@ public class LambdaSafeTests {
interface GenericMultiArgCallback<T extends CharSequence> { interface GenericMultiArgCallback<T extends CharSequence> {
void handle(Integer numner, T argument, Boolean bool); void handle(Integer number, T argument, Boolean bool);
} }
...@@ -468,7 +468,7 @@ public class LambdaSafeTests { ...@@ -468,7 +468,7 @@ public class LambdaSafeTests {
interface GenericMultiArgFactory<T extends CharSequence> { interface GenericMultiArgFactory<T extends CharSequence> {
Integer handle(Integer numner, T argument, Boolean bool); Integer handle(Integer number, T argument, Boolean bool);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment