Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] UseSupertypeWherePossible released

I did some similar work to this "UseSupertypeWherePossible" refactoring
(I think), but in the context of diagnosis as well as refactoring
analysis -- I'm interested in a code pointer to this feature and perhaps
an email from someone who worked on this to compare notes on the
soundness of the analysis.

I looked at over 2MLOC to gain an empirical understanding of this change
to code and implemented the analysis in a Eclipse plug-in.  For example,
I suspect you already realize this refactoring is very dangerous for
types derived from java.lang.Throwable due to Java language semantics --
there are several more gochas surrounding this in Java.

Did you derive this refactoring from Java "best practice" (e.g., Bloch's
rules in "Effective Java") or did it come from another other source?

Thanks,
Tim Halloran
Carnegie Mellon University

On Fri, 2002-09-20 at 07:11, Adam Kiezun wrote:
> UseSupertypeWherePossible has just been released:
> to use, select a type and choose 'use supertype where possible' - it will then find all places where updating to the supertype is
> possible.
> 
> The checkbox 'Use the supertype in instanceof expressions' should be used carefully - if it's checked, then expressions
>  (v instanceof OldType)
> are changed into
>  (v instanceof NewSuperType)
> the value of which is 'true' in possibly more places than before the change.
> 
> The action is enabled on types and compilation units with a primary type (or a single type).
> 
> The test suite is in the usual place.
> a.
> 
> 
> _______________________________________________
> jdt-ui-dev mailing list
> jdt-ui-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/jdt-ui-dev



Back to the top