Polish 'Simplify some code'

See gh-18438
pull/18477/head
Phillip Webb 5 years ago
parent e6b45de41e
commit b65ba60980

@ -56,7 +56,7 @@ class OverrideAutoConfigurationContextCustomizerFactory implements ContextCustom
@Override
public boolean equals(Object obj) {
return (obj != null && obj.getClass() == getClass());
return (obj != null) && (obj.getClass() == getClass());
}
@Override

@ -71,8 +71,8 @@ class TypeExcludeFiltersContextCustomizer implements ContextCustomizer {
@Override
public boolean equals(Object obj) {
return (obj != null && getClass() == obj.getClass()
&& this.filters.equals(((TypeExcludeFiltersContextCustomizer) obj).filters));
return (obj != null) && (getClass() == obj.getClass())
&& this.filters.equals(((TypeExcludeFiltersContextCustomizer) obj).filters);
}
@Override

@ -57,8 +57,8 @@ class PropertyMappingContextCustomizer implements ContextCustomizer {
@Override
public boolean equals(Object obj) {
return (obj != null && getClass() == obj.getClass()
&& this.propertySource.equals(((PropertyMappingContextCustomizer) obj).propertySource));
return (obj != null) && (getClass() == obj.getClass())
&& this.propertySource.equals(((PropertyMappingContextCustomizer) obj).propertySource);
}
@Override

@ -37,10 +37,7 @@ class ExcludeFilterContextCustomizer implements ContextCustomizer {
@Override
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
return obj != null && getClass() == obj.getClass();
return (obj != null) && (getClass() == obj.getClass());
}
@Override

@ -80,7 +80,7 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
@Override
public boolean equals(Object obj) {
return obj != null && obj.getClass() == getClass();
return (obj != null) && (getClass() == obj.getClass());
}
@Override

@ -208,8 +208,8 @@ class OutputCapture implements CapturedOutput {
}
private static PrintStream getSystemStream(PrintStream printStream) {
if (printStream instanceof PrintStreamCapture) {
return ((PrintStreamCapture) printStream).getParent();
while (printStream instanceof PrintStreamCapture) {
printStream = ((PrintStreamCapture) printStream).getParent();
}
return printStream;
}

@ -78,7 +78,7 @@ class TestRestTemplateContextCustomizer implements ContextCustomizer {
@Override
public boolean equals(Object obj) {
return obj != null && obj.getClass() == getClass();
return (obj != null) && (obj.getClass() == getClass());
}
@Override

@ -79,7 +79,7 @@ class WebTestClientContextCustomizer implements ContextCustomizer {
@Override
public boolean equals(Object obj) {
return (obj != null && obj.getClass() == getClass());
return (obj != null) && (obj.getClass() == getClass());
}
@Override

Loading…
Cancel
Save