Fix EA-81689
This commit is contained in:
@@ -235,6 +235,10 @@ public class ViewTypeDetector extends ResourceXmlDetector implements UastScanner
|
|||||||
}
|
}
|
||||||
|
|
||||||
private UBinaryExpressionWithType findContainingTypeCast(UElement expression) {
|
private UBinaryExpressionWithType findContainingTypeCast(UElement expression) {
|
||||||
|
if (expression == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (isTypeCast(expression)) {
|
if (isTypeCast(expression)) {
|
||||||
return (UBinaryExpressionWithType) expression;
|
return (UBinaryExpressionWithType) expression;
|
||||||
} else if (expression instanceof UQualifiedExpression) {
|
} else if (expression instanceof UQualifiedExpression) {
|
||||||
@@ -244,7 +248,7 @@ public class ViewTypeDetector extends ResourceXmlDetector implements UastScanner
|
|||||||
}
|
}
|
||||||
return findContainingTypeCast(parent);
|
return findContainingTypeCast(parent);
|
||||||
} else if (expression instanceof UParenthesizedExpression) {
|
} else if (expression instanceof UParenthesizedExpression) {
|
||||||
return findContainingTypeCast(((UParenthesizedExpression) expression).getExpression());
|
return findContainingTypeCast(expression.getParent());
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user