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 141671 Details for
Bug 282869
[compiler] Unnecessary cast warning for cast from char to int
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_282869.txt (text/plain), 1.66 KB, created by
Olivier Thomann
on 2009-07-15 13:07:05 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-07-15 13:07:05 EDT
Size:
1.66 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java,v >retrieving revision 1.59 >diff -u -r1.59 CompoundAssignment.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 30 Jun 2009 14:24:18 -0000 1.59 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java 15 Jul 2009 16:57:21 -0000 >@@ -108,6 +108,8 @@ > return null; > } > TypeBinding originalLhsType = this.lhs.resolveType(scope); >+ boolean expressionIsCast; >+ if ((expressionIsCast = this.expression instanceof CastExpression) == true) this.expression.bits |= ASTNode.DisableUnnecessaryCastCheck; // will check later on > TypeBinding originalExpressionType = this.expression.resolveType(scope); > if (originalLhsType == null || originalExpressionType == null) > return null; >@@ -181,6 +183,10 @@ > this.expression.computeConversion(scope, TypeBinding.wellKnownType(scope, (result >>> 8) & 0x0000F), originalExpressionType); > this.preAssignImplicitConversion = (unboxedLhs ? BOXING : 0) | (lhsID << 4) | (result & 0x0000F); > if (unboxedLhs) scope.problemReporter().autoboxing(this, lhsType, originalLhsType); >+ // check need for operand cast >+ if (expressionIsCast) { >+ CastExpression.checkNeedForArgumentCasts(scope, this.operator, result, this.lhs, originalLhsType.id, false, this.expression, originalExpressionType.id, true); >+ } > return this.resolvedType = originalLhsType; > } >
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 282869
: 141671 |
142290