I've been thinking about a new code-cleanup function that might be of some
use in Intellij. 

Many times people do silly things like -

ArrayList a = new ArrayList 

and then procede to use the get and add methods only.

These two methods are part of the List interface, so a more flexible
[interface oriented] implementation would do something like - 

List a = new ArrayList

Code like this this is especially pernicious when it's a return type or a
parameter. Causing clients to do unnecessary conversion around methods
calls.

It would be great if Intellij could discern when it was appropriate to untie
yourself from a concrete implementation. 

The example above is a trivial example, which most people would know to
avoid, but many times when confronted with a new framework, unecessary
concrete falls through the cracks, which only cause upgrade pain further
down the line. 

what do others think?

regards,
dk-


_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-features

Reply via email to