Hi guys, yesterday, I went through the code looking for places where 'instanceof' was used. I found two typical improvements that could be applied :
o useless check on x != null like in : if ( ( x != null ) && ( x instanceof X ) ) o useless check of x == null like in : if ( ( x == null ) || !( x instanceof X ) ) instanceof is guaranteed to return false if x is null. That's just a itch I wanted to scracth yesterday. At this point, I think that adding checkstyle in Studio would most certainly be a nit of a pain (I suspect that we will get thousands of failures ;-) but this might be good to have. Stefan did a great job with the API, and I thinkw e should benefit from what he did in the other projects, including Studio. The real problem with Studio is that a lot of its code is quite old (keep in mind it started around 2005 !!!) and there is a lot of discrepancies between older code and ore recent one. Thoughts ?
