View | Details | Raw Unified | Return to bug 101208 | Differences between
and this patch

Collapse All | Expand All

(-)InstanceOfExpression.java (-1 / +3 lines)
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

Return to bug 101208