Summary: | RFE: Compiler Warning: unnecessary lower casting | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ahmed Ashour <asashour> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | VERIFIED WORKSFORME | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | philippe_mulet |
Version: | 3.4 | ||
Target Milestone: | 3.5 M2 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Ahmed Ashour
2008-09-05 03:38:50 EDT
Unused cast warning is already available, please check: Preferences > Java > Compiler > Unnecessary code > Unnecessary cast or 'instanceof' operation > Warning Note that in the specific case you entered, the cast looks useless on the surface, but will induce some subtle changes in the generated classfile (since the actual receiver type is recorded in bytecode instruction) and can alter binary compatibility. Hence the compiler will not suggest removing the cast for this very specific pattern (which is not frequent btw). Closing as worksforme. Verified for 3.5M2 using I20080914-2000. |