Bug 102684 - Split unnecessary cast and unnecessary instanceof detection
Summary: Split unnecessary cast and unnecessary instanceof detection
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-04 15:00 EDT by Elliotte Rusty Harold CLA
Modified: 2005-07-04 15:00 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elliotte Rusty Harold CLA 2005-07-04 15:00:35 EDT
Currently there is one preference for detecting both unnecessary casts and
unnecessaryinstanceofs. Thus I can set this to Ignore, Error, or Warning; but I
can't make ignore an unnecessary cast and not ignore an unnecessary instanceof.
This should be separately configurable.

An unnecessary cast is trivial and will probably be removed by the compiler. An
unnecessary instanceof probably won't be and may have severe performance
impacts. On at least one project I'm working on the lead developer likes
unnecessary casts. he thinks they make the code easier to read so I have to set
this preference to Ignore for that project. However, I'd still like to be warned
of unnecessary instanceof.