Apply SingleSpaceSeparator Checkstyle module

This commit also fixes its violations.

Closes gh-31469
This commit is contained in:
Johnny Lim
2023-10-22 00:10:45 +09:00
committed by Sam Brannen
parent 8a05661707
commit 64e9fcad53
164 changed files with 229 additions and 226 deletions

View File

@@ -245,7 +245,7 @@ class DefaultServerResponseBuilder implements ServerResponse.BodyBuilder {
return initBuilder(producer, BodyInserters.fromProducer(producer, elementTypeRef));
}
private <T> Mono<ServerResponse> initBuilder(T entity, BodyInserter<T, ReactiveHttpOutputMessage> inserter) {
private <T> Mono<ServerResponse> initBuilder(T entity, BodyInserter<T, ReactiveHttpOutputMessage> inserter) {
return new DefaultEntityResponseBuilder<>(entity, inserter)
.status(this.statusCode)
.headers(this.headers)

View File

@@ -1200,7 +1200,7 @@ public abstract class RequestPredicates {
@Override
public String toString() {
return method() + " " + path();
return method() + " " + path();
}
}

View File

@@ -901,7 +901,7 @@ public abstract class RouterFunctions {
* @return this builder
*/
Builder onError(Predicate<? super Throwable> predicate,
BiFunction<? super Throwable, ServerRequest, Mono<ServerResponse>> responseProvider);
BiFunction<? super Throwable, ServerRequest, Mono<ServerResponse>> responseProvider);
/**
* Filters all exceptions of the given type by applying the given response provider
@@ -1199,7 +1199,7 @@ public abstract class RouterFunctions {
}
private static class ResourcesRouterFunction extends AbstractRouterFunction<ServerResponse> {
private static class ResourcesRouterFunction extends AbstractRouterFunction<ServerResponse> {
private final Function<ServerRequest, Mono<Resource>> lookupFunction;

View File

@@ -325,7 +325,7 @@ public final class ProducesRequestCondition extends AbstractRequestCondition<Pro
* with a {@value MediaType#ALL_VALUE} expression.
*/
private List<ProduceMediaTypeExpression> getExpressionsToCompare() {
return (this.expressions.isEmpty() ? this.mediaTypeAllList : this.expressions);
return (this.expressions.isEmpty() ? this.mediaTypeAllList : this.expressions);
}

View File

@@ -134,7 +134,7 @@ class ModelInitializer {
}
private boolean isAsyncVoidType(ResolvableType type, MethodParameter typeSource, @Nullable ReactiveAdapter adapter) {
private boolean isAsyncVoidType(ResolvableType type, MethodParameter typeSource, @Nullable ReactiveAdapter adapter) {
Method method = typeSource.getMethod();
return (adapter != null && (adapter.isNoValue() || type.resolveGeneric() == Void.class)) ||
(method != null && KotlinDetector.isSuspendingFunction(method) && typeSource.getParameterType() == void.class);

View File

@@ -247,7 +247,7 @@ public abstract class AbstractView implements View, BeanNameAware, ApplicationCo
protected Mono<Void> resolveAsyncAttributes(Map<String, Object> model, ServerWebExchange exchange) {
List<Mono<?>> asyncAttributes = null;
for (Map.Entry<String, ?> entry : model.entrySet()) {
Object value = entry.getValue();
Object value = entry.getValue();
if (value == null) {
continue;
}

View File

@@ -204,7 +204,7 @@ public class FreeMarkerView extends AbstractUrlBasedView {
}
catch (ParseException ex) {
throw new ApplicationContextException(
"Failed to parse FreeMarker template for URL [" + getUrl() + "]", ex);
"Failed to parse FreeMarker template for URL [" + getUrl() + "]", ex);
}
catch (IOException ex) {
throw new ApplicationContextException(
@@ -225,7 +225,7 @@ public class FreeMarkerView extends AbstractUrlBasedView {
.switchIfEmpty(Mono.just(Boolean.FALSE))
.onErrorReturn(FileNotFoundException.class, Boolean.FALSE)
.onErrorMap(ParseException.class, ex -> new ApplicationContextException(
"Failed to parse FreeMarker template for URL [" + getUrl() + "]", ex))
"Failed to parse FreeMarker template for URL [" + getUrl() + "]", ex))
.onErrorMap(IOException.class, ex -> new ApplicationContextException(
"Could not load FreeMarker template for URL [" + getUrl() + "]", ex));
}

View File

@@ -50,7 +50,7 @@ public final class CloseStatus {
* "1002 indicates that an endpoint is terminating the connection due to a protocol
* error."
*/
public static final CloseStatus PROTOCOL_ERROR = new CloseStatus(1002);
public static final CloseStatus PROTOCOL_ERROR = new CloseStatus(1002);
/**
* "1003 indicates that an endpoint is terminating the connection because it has