Introduce Checkstyle rule for separator symbol location

This commit is contained in:
Sam Brannen
2025-03-19 15:35:35 +01:00
parent 18c3b637e4
commit 208d52d852
97 changed files with 378 additions and 403 deletions

View File

@@ -71,8 +71,8 @@ public class MessagingException extends NestedRuntimeException {
@Override
public String toString() {
return super.toString() + (this.failedMessage == null ? ""
: (", failedMessage=" + this.failedMessage));
return super.toString() + (this.failedMessage == null ? "" :
(", failedMessage=" + this.failedMessage));
}
}

View File

@@ -202,8 +202,8 @@ public class MappingJackson2MessageConverter extends AbstractMessageConverter {
}
// Do not log warning for serializer not found (note: different message wording on Jackson 2.9)
boolean debugLevel = (cause instanceof JsonMappingException && cause.getMessage() != null
&& cause.getMessage().startsWith("Cannot find"));
boolean debugLevel = (cause instanceof JsonMappingException && cause.getMessage() != null &&
cause.getMessage().startsWith("Cannot find"));
if (debugLevel ? logger.isDebugEnabled() : logger.isWarnEnabled()) {
String msg = "Failed to evaluate Jackson " + (type instanceof JavaType ? "de" : "") +

View File

@@ -176,8 +176,8 @@ public class GenericMessagingTemplate extends AbstractDestinationResolvingMessag
accessor.removeHeader(this.receiveTimeoutHeader);
accessor.setImmutable();
}
else if (message.getHeaders().containsKey(this.sendTimeoutHeader)
|| message.getHeaders().containsKey(this.receiveTimeoutHeader)) {
else if (message.getHeaders().containsKey(this.sendTimeoutHeader) ||
message.getHeaders().containsKey(this.receiveTimeoutHeader)) {
messageToSend = MessageBuilder.fromMessage(message)
.setHeader(this.sendTimeoutHeader, null)
.setHeader(this.receiveTimeoutHeader, null)

View File

@@ -196,8 +196,8 @@ public class HandlerMethod extends AnnotatedMethod {
@Override
public boolean equals(@Nullable Object other) {
return (this == other || (super.equals(other) && other instanceof HandlerMethod otherMethod
&& this.bean.equals(otherMethod.bean)));
return (this == other || (super.equals(other) && other instanceof HandlerMethod otherMethod &&
this.bean.equals(otherMethod.bean)));
}
@Override

View File

@@ -126,8 +126,8 @@ public class StompEncoder {
return;
}
boolean shouldEscape = (command != StompCommand.CONNECT && command != StompCommand.STOMP
&& command != StompCommand.CONNECTED);
boolean shouldEscape = (command != StompCommand.CONNECT && command != StompCommand.STOMP &&
command != StompCommand.CONNECTED);
for (Entry<String, List<String>> entry : nativeHeaders.entrySet()) {
if (command.requiresContentLength() && "content-length".equals(entry.getKey())) {

View File

@@ -538,8 +538,8 @@ public abstract class AbstractStompBrokerRelayIntegrationTests {
@Override
public String toString() {
return super.toString() + ", subscriptionId=\"" + this.subscriptionId
+ "\", destination=\"" + this.destination + "\", payload=\"" + getPayloadAsText() + "\"";
return super.toString() + ", subscriptionId=\"" + this.subscriptionId +
"\", destination=\"" + this.destination + "\", payload=\"" + getPayloadAsText() + "\"";
}
protected String getPayloadAsText() {