Lines 95-101
Link Here
|
95 |
* @see org.eclipse.jdt.internal.compiler.ast.Expression#tagAsUnnecessaryCast(Scope,TypeBinding) |
95 |
* @see org.eclipse.jdt.internal.compiler.ast.Expression#tagAsUnnecessaryCast(Scope,TypeBinding) |
96 |
*/ |
96 |
*/ |
97 |
public void tagAsUnnecessaryCast(Scope scope, TypeBinding castType) { |
97 |
public void tagAsUnnecessaryCast(Scope scope, TypeBinding castType) { |
98 |
scope.problemReporter().unnecessaryInstanceof(this, castType); |
98 |
// null is not instanceof Type, recognize direct scenario |
|
|
99 |
if (expression.resolvedType != NullBinding) |
100 |
scope.problemReporter().unnecessaryInstanceof(this, castType); |
99 |
} |
101 |
} |
100 |
public void traverse(ASTVisitor visitor, BlockScope scope) { |
102 |
public void traverse(ASTVisitor visitor, BlockScope scope) { |
101 |
|
103 |
|