diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java index b11e476..2d0066b 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java @@ -135,9 +135,8 @@ this.initialization.generateCode(currentScope, codeStream, true); // 26903, need extra cast to store null in array local var if (this.binding.type.isArrayType() - && (this.initialization.resolvedType == TypeBinding.NULL // arrayLoc = null - || ((this.initialization instanceof CastExpression) // arrayLoc = (type[])null - && (((CastExpression)this.initialization).innermostCastedExpression().resolvedType == TypeBinding.NULL)))){ + && ((this.initialization instanceof CastExpression) // arrayLoc = (type[])null + && (((CastExpression)this.initialization).innermostCastedExpression().resolvedType == TypeBinding.NULL))){ codeStream.checkcast(this.binding.type); } codeStream.store(this.binding, false); diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java index a2cdd89..d625d5b 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java @@ -352,9 +352,8 @@ } // 26903, need extra cast to store null in array local var if (localBinding.type.isArrayType() - && (assignment.expression.resolvedType == TypeBinding.NULL // arrayLoc = null - || ((assignment.expression instanceof CastExpression) // arrayLoc = (type[])null - && (((CastExpression)assignment.expression).innermostCastedExpression().resolvedType == TypeBinding.NULL)))){ + && ((assignment.expression instanceof CastExpression) // arrayLoc = (type[])null + && (((CastExpression)assignment.expression).innermostCastedExpression().resolvedType == TypeBinding.NULL))){ codeStream.checkcast(localBinding.type); }