Community
Participate
Working Groups
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.