Introduce Checkstyle rule for separator symbol location
This commit is contained in:
@@ -102,8 +102,8 @@ public class DefaultMethodReference implements MethodReference {
|
||||
TypeName argumentType = argumentTypes[i];
|
||||
CodeBlock argumentCode = argumentCodeGenerator.generateCode(argumentType);
|
||||
if (argumentCode == null) {
|
||||
throw new IllegalArgumentException("Could not generate code for " + this
|
||||
+ ": parameter " + i + " of type " + argumentType + " is not supported");
|
||||
throw new IllegalArgumentException("Could not generate code for " + this +
|
||||
": parameter " + i + " of type " + argumentType + " is not supported");
|
||||
}
|
||||
arguments.add(argumentCode);
|
||||
}
|
||||
|
||||
@@ -192,9 +192,9 @@ public interface GeneratedFiles {
|
||||
|
||||
private static void validatePackage(String packageName, String className) {
|
||||
if (!StringUtils.hasLength(packageName)) {
|
||||
throw new IllegalArgumentException("Could not add '" + className + "', "
|
||||
+ "processing classes in the default package is not supported. "
|
||||
+ "Did you forget to add a package statement?");
|
||||
throw new IllegalArgumentException("Could not add '" + className + "', " +
|
||||
"processing classes in the default package is not supported. " +
|
||||
"Did you forget to add a package statement?");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -240,8 +240,8 @@ public abstract class ValueCodeGeneratorDelegates {
|
||||
if (escaped != null) {
|
||||
return escaped;
|
||||
}
|
||||
return (!Character.isISOControl(ch)) ? Character.toString(ch)
|
||||
: String.format("\\u%04x", (int) ch);
|
||||
return (!Character.isISOControl(ch)) ? Character.toString(ch) :
|
||||
String.format("\\u%04x", (int) ch);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,8 +108,8 @@ public class BindingReflectionHintsRegistrar {
|
||||
registerPropertyHints(hints, seen, method, 0);
|
||||
}
|
||||
else if ((methodName.startsWith("get") && method.getParameterCount() == 0 && method.getReturnType() != void.class) ||
|
||||
(methodName.startsWith("is") && method.getParameterCount() == 0
|
||||
&& ClassUtils.resolvePrimitiveIfNecessary(method.getReturnType()) == Boolean.class)) {
|
||||
(methodName.startsWith("is") && method.getParameterCount() == 0 &&
|
||||
ClassUtils.resolvePrimitiveIfNecessary(method.getReturnType()) == Boolean.class)) {
|
||||
registerPropertyHints(hints, seen, method, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,8 +375,8 @@ final class TypeMappedAnnotation<A extends Annotation> extends AbstractMergedAnn
|
||||
private Object getRequiredValue(int attributeIndex, String attributeName) {
|
||||
Object value = getValue(attributeIndex, Object.class);
|
||||
if (value == null) {
|
||||
throw new NoSuchElementException("No element at attribute index "
|
||||
+ attributeIndex + " for name " + attributeName);
|
||||
throw new NoSuchElementException("No element at attribute index " +
|
||||
attributeIndex + " for name " + attributeName);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -71,8 +71,8 @@ public class ResourceRegionEncoder extends AbstractEncoder<ResourceRegion> {
|
||||
|
||||
@Override
|
||||
public boolean canEncode(ResolvableType elementType, @Nullable MimeType mimeType) {
|
||||
return super.canEncode(elementType, mimeType)
|
||||
&& ResourceRegion.class.isAssignableFrom(elementType.toClass());
|
||||
return super.canEncode(elementType, mimeType) &&
|
||||
ResourceRegion.class.isAssignableFrom(elementType.toClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -472,8 +472,8 @@ public class SpringFactoriesLoader {
|
||||
|
||||
private static <T> void makeAccessible(Constructor<T> constructor,
|
||||
KFunction<T> kotlinConstructor) {
|
||||
if ((!Modifier.isPublic(constructor.getModifiers())
|
||||
|| !Modifier.isPublic(constructor.getDeclaringClass().getModifiers()))) {
|
||||
if ((!Modifier.isPublic(constructor.getModifiers()) ||
|
||||
!Modifier.isPublic(constructor.getDeclaringClass().getModifiers()))) {
|
||||
KCallablesJvm.setAccessible(kotlinConstructor, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,8 +275,8 @@ public class AntPathMatcher implements PathMatcher {
|
||||
if (!matchStrings(pattDir, pathDirs[pathIdxEnd], uriTemplateVariables)) {
|
||||
return false;
|
||||
}
|
||||
if (pattIdxEnd == (pattDirs.length - 1)
|
||||
&& pattern.endsWith(this.pathSeparator) != path.endsWith(this.pathSeparator)) {
|
||||
if (pattIdxEnd == (pattDirs.length - 1) &&
|
||||
pattern.endsWith(this.pathSeparator) != path.endsWith(this.pathSeparator)) {
|
||||
return false;
|
||||
}
|
||||
pattIdxEnd--;
|
||||
|
||||
@@ -557,9 +557,7 @@ public final class ConcurrentLruCache<K, V> {
|
||||
}
|
||||
|
||||
private boolean contains(Node<K, V> e) {
|
||||
return (e.getPrevious() != null)
|
||||
|| (e.getNext() != null)
|
||||
|| (e == this.first);
|
||||
return (e.getPrevious() != null) || (e.getNext() != null) || (e == this.first);
|
||||
}
|
||||
|
||||
private void linkLast(final Node<K, V> e) {
|
||||
|
||||
Reference in New Issue
Block a user