Simplify if statements
See gh-17884
This commit is contained in:
committed by
Stephane Nicoll
parent
fc0cee5ea7
commit
9c1f503e46
@@ -49,7 +49,7 @@ final class Elements {
|
||||
if (type instanceof DeclaredType) {
|
||||
DeclaredType declaredType = (DeclaredType) type;
|
||||
Element enclosingElement = declaredType.asElement().getEnclosingElement();
|
||||
if (enclosingElement != null && enclosingElement instanceof TypeElement) {
|
||||
if (enclosingElement instanceof TypeElement) {
|
||||
return (TypeElement) enclosingElement;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public abstract class SystemPropertyUtils {
|
||||
placeholder = parseStringValue(properties, value, placeholder, visitedPlaceholders);
|
||||
// Now obtain the value for the fully resolved key...
|
||||
String propVal = resolvePlaceholder(properties, value, placeholder);
|
||||
if (propVal == null && VALUE_SEPARATOR != null) {
|
||||
if (propVal == null) {
|
||||
int separatorIndex = placeholder.indexOf(VALUE_SEPARATOR);
|
||||
if (separatorIndex != -1) {
|
||||
String actualPlaceholder = placeholder.substring(0, separatorIndex);
|
||||
|
||||
@@ -59,7 +59,7 @@ class OutputCapture implements CapturedOutput {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof CapturedOutput || obj instanceof CharSequence) {
|
||||
if (obj instanceof CharSequence) {
|
||||
return getAll().equals(obj.toString());
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user