Skip to content

Commit 88b184c

Browse files
izeyephilwebb
authored andcommitted
Polish
1 parent cc9a5b7 commit 88b184c

File tree

14 files changed

+27
-29
lines changed

14 files changed

+27
-29
lines changed

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ protected void doFilterInternal(HttpServletRequest request,
113113

114114
private void filterAndRecordMetrics(HttpServletRequest request,
115115
HttpServletResponse response, FilterChain filterChain)
116-
throws IOException, ServletException, NestedServletException {
117-
Object handler = null;
116+
throws IOException, ServletException {
117+
Object handler;
118118
try {
119119
handler = getHandler(request);
120120
}
@@ -149,7 +149,7 @@ private HandlerMappingIntrospector getMappingIntrospector() {
149149

150150
private void filterAndRecordMetrics(HttpServletRequest request,
151151
HttpServletResponse response, FilterChain filterChain, Object handler)
152-
throws IOException, ServletException, NestedServletException {
152+
throws IOException, ServletException {
153153
TimingContext timingContext = TimingContext.get(request);
154154
if (timingContext == null) {
155155
timingContext = startAndAttachTimingContext(request, handler);

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/StaticResourceLocation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public enum StaticResourceLocation {
5151
*/
5252
FAVICON("/**/favicon.ico");
5353

54-
private String[] patterns;
54+
private final String[] patterns;
5555

5656
StaticResourceLocation(String... patterns) {
5757
this.patterns = patterns;

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/PathRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private PathRequest() {
3333

3434
/**
3535
* Returns a {@link StaticResourceRequest} that can be used to create a matcher for
36-
* {@link StaticResourceLocation Locations}.
36+
* {@link StaticResourceLocation locations}.
3737
* @return a {@link StaticResourceRequest}
3838
*/
3939
public static StaticResourceRequest toStaticResources() {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public StaticResourceServerWebExchange at(Set<StaticResourceLocation> locations)
9090

9191
/**
9292
* The server web exchange matcher used to match against resource
93-
* {@link StaticResourceLocation Locations}.
93+
* {@link StaticResourceLocation locations}.
9494
*/
9595
public static final class StaticResourceServerWebExchange
9696
implements ServerWebExchangeMatcher {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/servlet/PathRequest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private PathRequest() {
3838

3939
/**
4040
* Returns a {@link StaticResourceRequest} that can be used to create a matcher for
41-
* {@link StaticResourceLocation Locations}.
41+
* {@link StaticResourceLocation locations}.
4242
* @return a {@link StaticResourceRequest}
4343
*/
4444
public static StaticResourceRequest toStaticResources() {

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/reactive/StaticResourceRequestTests.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,10 @@ public void excludeFromSetWhenSetIsNullShouldThrowException() {
9090
this.resourceRequest.atCommonLocations().excluding(null);
9191
}
9292

93-
private StaticResourceRequestTests.RequestMatcherAssert assertMatcher(
94-
ServerWebExchangeMatcher matcher) {
93+
private RequestMatcherAssert assertMatcher(ServerWebExchangeMatcher matcher) {
9594
StaticWebApplicationContext context = new StaticWebApplicationContext();
9695
context.registerBean(ServerProperties.class);
97-
return assertThat(
98-
new StaticResourceRequestTests.RequestMatcherAssert(context, matcher));
96+
return assertThat(new RequestMatcherAssert(context, matcher));
9997
}
10098

10199
private static class RequestMatcherAssert implements AssertDelegateTarget {

spring-boot-project/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ provided:
13391339

13401340
[source,properties,indent=0]
13411341
----
1342-
management.metrics.export.signalfx.acesss-token=YOUR_ACCESS_TOKEN
1342+
management.metrics.export.signalfx.access-token=YOUR_ACCESS_TOKEN
13431343
----
13441344

13451345
You can also change the interval at which metrics are sent to SignalFx:

spring-boot-project/spring-boot-test/src/test/java/org/springframework/boot/test/context/assertj/ApplicationContextAssertTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public void getBeanOfTypeWhenInParentShouldReturnBeanAssert() {
260260
}
261261

262262
@Test
263-
public void getBeanOfTypeWhenInParentWithLimtedScopeShouldReturnNullAssert() {
263+
public void getBeanOfTypeWhenInParentWithLimitedScopeShouldReturnNullAssert() {
264264
this.parent.registerSingleton("foo", Foo.class);
265265
assertThat(getAssert(this.context)).getBean(Foo.class, Scope.NO_ANCESTORS)
266266
.isNull();

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/SpecificEndpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.springframework.lang.Nullable;
2222

2323
/**
24-
* An meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in
24+
* A meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in
2525
* Spring Boot. Also with a package private read operation that has an optional argument.
2626
*
2727
* @author Stephane Nicoll

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationsample/endpoint/incremental/IncrementalSpecificEndpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import org.springframework.boot.configurationsample.MetaEndpoint;
2020

2121
/**
22-
* An meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in
22+
* A meta-annotated endpoint similar to {@code @WebEndpoint} or {@code @JmxEndpoint} in
2323
* Spring Boot.
2424
*
2525
* @author Stephane Nicoll

spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import org.apache.commons.compress.archivers.zip.UnixStat;
4848

4949
/**
50-
* Writes JAR content, ensuring valid directory entries are always create and duplicate
50+
* Writes JAR content, ensuring valid directory entries are always created and duplicate
5151
* items are ignored.
5252
*
5353
* @author Phillip Webb
@@ -247,7 +247,7 @@ private void writeEntry(JarArchiveEntry entry, EntryWriter entryWriter)
247247
}
248248

249249
/**
250-
* Perform the actual write of a {@link JarEntry}. All other {@code write} methods
250+
* Perform the actual write of a {@link JarEntry}. All other write methods
251251
* delegate to this one.
252252
* @param entry the entry to write
253253
* @param entryWriter the entry writer or {@code null} if there is no content

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/netty/NettyReactiveWebServerFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void addServerCustomizers(NettyServerCustomizer... serverCustomizers) {
9292
/**
9393
* Set the maximum amount of time that should be waited when starting or stopping the
9494
* server.
95-
* @param lifecycleTimeout the lefecycle timeout
95+
* @param lifecycleTimeout the lifecycle timeout
9696
*/
9797
public void setLifecycleTimeout(Duration lifecycleTimeout) {
9898
this.lifecycleTimeout = lifecycleTimeout;

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -275,24 +275,24 @@ public void loadWhenBindingOnlyParentContextShouldBind() {
275275
}
276276

277277
@Test
278-
public void loadWhenPrefixedPropertiesDecalredAsBeanShouldBind() {
279-
load(PrefixPropertiesDecalredAsBeanConfiguration.class, "spring.foo.name=foo");
278+
public void loadWhenPrefixedPropertiesDeclaredAsBeanShouldBind() {
279+
load(PrefixPropertiesDeclaredAsBeanConfiguration.class, "spring.foo.name=foo");
280280
PrefixProperties bean = this.context.getBean(PrefixProperties.class);
281281
assertThat(((BasicProperties) bean).name).isEqualTo("foo");
282282
}
283283

284284
@Test
285-
public void loadWhenPrefixedPropertiesDecalredAsAnnotationValueShouldBind() {
286-
load(PrefixPropertiesDecalredAsAnnotationValueConfiguration.class,
285+
public void loadWhenPrefixedPropertiesDeclaredAsAnnotationValueShouldBind() {
286+
load(PrefixPropertiesDeclaredAsAnnotationValueConfiguration.class,
287287
"spring.foo.name=foo");
288288
PrefixProperties bean = this.context.getBean(
289289
"spring.foo-" + PrefixProperties.class.getName(), PrefixProperties.class);
290290
assertThat(((BasicProperties) bean).name).isEqualTo("foo");
291291
}
292292

293293
@Test
294-
public void loadWhenMultiplePrefixedPropertiesDecalredAsAnnotationValueShouldBind() {
295-
load(MultiplePrefixPropertiesDecalredAsAnnotationValueConfiguration.class,
294+
public void loadWhenMultiplePrefixedPropertiesDeclaredAsAnnotationValueShouldBind() {
295+
load(MultiplePrefixPropertiesDeclaredAsAnnotationValueConfiguration.class,
296296
"spring.foo.name=foo", "spring.bar.name=bar");
297297
PrefixProperties bean1 = this.context.getBean(PrefixProperties.class);
298298
AnotherPrefixProperties bean2 = this.context
@@ -510,7 +510,7 @@ public void loadWhenHasMultiplePropertySourcesPlaceholderConfigurerShouldLogWarn
510510
}
511511

512512
@Test
513-
public void loadWhenOverridingPropertiesWithPlaceholderResolutionInEnvionmentShouldBindWithOverride() {
513+
public void loadWhenOverridingPropertiesWithPlaceholderResolutionInEnvironmentShouldBindWithOverride() {
514514
MutablePropertySources sources = this.context.getEnvironment()
515515
.getPropertySources();
516516
sources.addFirst(new SystemEnvironmentPropertySource("system",
@@ -790,7 +790,7 @@ public BasicProperties basicProperties() {
790790

791791
@Configuration
792792
@EnableConfigurationProperties
793-
static class PrefixPropertiesDecalredAsBeanConfiguration {
793+
static class PrefixPropertiesDeclaredAsBeanConfiguration {
794794

795795
@Bean
796796
public PrefixProperties prefixProperties() {
@@ -801,14 +801,14 @@ public PrefixProperties prefixProperties() {
801801

802802
@Configuration
803803
@EnableConfigurationProperties(PrefixProperties.class)
804-
static class PrefixPropertiesDecalredAsAnnotationValueConfiguration {
804+
static class PrefixPropertiesDeclaredAsAnnotationValueConfiguration {
805805

806806
}
807807

808808
@Configuration
809809
@EnableConfigurationProperties({ PrefixProperties.class,
810810
AnotherPrefixProperties.class })
811-
static class MultiplePrefixPropertiesDecalredAsAnnotationValueConfiguration {
811+
static class MultiplePrefixPropertiesDeclaredAsAnnotationValueConfiguration {
812812

813813
}
814814

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/bind/BindableTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void withAnnotationsShouldSetAnnotations() {
142142
}
143143

144144
@Test
145-
public void getAnnotationWhenMatchShouldReuturnAnnotation() {
145+
public void getAnnotationWhenMatchShouldReturnAnnotation() {
146146
Test annotation = AnnotationUtils.synthesizeAnnotation(Test.class);
147147
assertThat(Bindable.of(String.class).withAnnotations(annotation)
148148
.getAnnotation(Test.class)).isSameAs(annotation);

0 commit comments

Comments
 (0)