Fix checkstyle method order issues
Fix checkstyle issues with method ordering following the spring-javaformat upgrade. See gh-13932
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -62,13 +62,13 @@ class OverrideAutoConfigurationContextCustomizerFactory
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && obj.getClass() == getClass());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && obj.getClass() == getClass());
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -117,21 +117,6 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 0;
|
||||
result = prime * result + Boolean.hashCode(hasAnnotation());
|
||||
for (FilterType filterType : FilterType.values()) {
|
||||
result = prime * result
|
||||
+ ObjectUtils.nullSafeHashCode(getFilters(filterType));
|
||||
}
|
||||
result = prime * result + Boolean.hashCode(isUseDefaultFilters());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getDefaultIncludes());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getComponentIncludes());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
@@ -155,4 +140,19 @@ public abstract class AnnotationCustomizableTypeExcludeFilter extends TypeExclud
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 0;
|
||||
result = prime * result + Boolean.hashCode(hasAnnotation());
|
||||
for (FilterType filterType : FilterType.values()) {
|
||||
result = prime * result
|
||||
+ ObjectUtils.nullSafeHashCode(getFilters(filterType));
|
||||
}
|
||||
result = prime * result + Boolean.hashCode(isUseDefaultFilters());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getDefaultIncludes());
|
||||
result = prime * result + ObjectUtils.nullSafeHashCode(getComponentIncludes());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -73,17 +73,17 @@ class TypeExcludeFiltersContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.filters.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && getClass() == obj.getClass() && this.filters
|
||||
.equals(((TypeExcludeFiltersContextCustomizer) obj).filters));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.filters.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void customizeContext(ConfigurableApplicationContext context,
|
||||
MergedContextConfiguration mergedContextConfiguration) {
|
||||
|
||||
@@ -201,11 +201,6 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
|
||||
return this.properties.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.properties.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -217,4 +212,9 @@ public class AnnotationsPropertySource extends EnumerablePropertySource<Class<?>
|
||||
return this.properties.equals(((AnnotationsPropertySource) obj).properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.properties.hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -55,17 +55,17 @@ class PropertyMappingContextCustomizer implements ContextCustomizer {
|
||||
new PropertyMappingCheckBeanPostProcessor());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.propertySource.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj != null && getClass() == obj.getClass() && this.propertySource
|
||||
.equals(((PropertyMappingContextCustomizer) obj).propertySource));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return this.propertySource.hashCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link BeanPostProcessor} to check that {@link PropertyMapping} is only used on
|
||||
* test classes.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2017 the original author or authors.
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,11 +49,6 @@ class WebDriverContextCustomizerFactory implements ContextCustomizerFactory {
|
||||
WebDriverScope.registerWith(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
@@ -65,6 +60,11 @@ class WebDriverContextCustomizerFactory implements ContextCustomizerFactory {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getClass().hashCode();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user