Marc,
"AClass.class" problem is fixed in #633.

As to "instanceof AClass": while I agree that this makes
no sense in most cases, there is a case when replacing class
in instanceof can be useful: when you have only one implementation
of the interface/superclass you are changing to, and that being the one
you are replacing. And this is the case immediately after "Extract
interface" and "Extract superclass" refactorings (this is when
"Use Interface Where Possible" is invoked semi-automatically
[aka "second stage of 'Extract Interface'"]).

So we decided to make instanceof usages replacement optional
(unchecked by default).
This will be available in one of the future builds.

Thank you for your report,
Friendly,
     Dmitry



Marc Strapetz wrote:
> "Use Interface Where Possible" is an ingenius refactoring -- could
> even be part of Code Layout ...
> 
> Two problems: For constructions "AClass.class" and "instanceof AClass"
> it also suggests to have the selected super class/interface. This
> makes no sense.
> 
> With best regards,
>  Marc Strapetz.


-- 
Dmitry Lomov
JetBrains Inc. / IntelliJ Software
http://www.intellij.com
"Develop with pleasure!"

_______________________________________________
Eap-bugs mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-bugs

Reply via email to