Simplify if statements

See gh-17884
This commit is contained in:
thelproad
2019-08-16 16:52:40 +08:00
committed by Stephane Nicoll
parent fc0cee5ea7
commit 9c1f503e46
3 changed files with 3 additions and 3 deletions

View File

@@ -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;
}
}