Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 205875 Details for
Bug 359284
Unnecessary checkast from null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed fix
HEAD--Fixed-bug-359284-Unnecessary-checkast-from-nul.patch (text/plain), 2.23 KB, created by
Ayushman Jain
on 2011-10-25 02:03:20 EDT
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-10-25 02:03:20 EDT
Size:
2.23 KB
patch
obsolete
>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); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 359284
:
205874
|
205875
|
206766