Re: [Clirr-devel] Removing ClassSetCheck?
Status: Alpha
Brought to you by:
lkuehne
From: <lak...@t-...> - 2004-06-21 15:08:00
|
Simon Kitching wrote: >Hi Lars, > >I've been thinking about the ClassSetChangeCheck interface, and the >classes that implement "class set checks", ie AddedClassCheck and >RemovedClassCheck. > >Can you think of any other sorts of checks that could be applied to >class sets? I must admit I can't, and it would be *very* simple to add >the check for added/removed classes directly into the Checker class. > >In fact, with the CoIterator code now in the Checker.runClassChecks >method, this is basically being done already: > > if ((compatBaselineClass != null) && (currentClass != null)) > { > .. apply class check > } > >If the above if-statement were changed to: > > if (compatBaselineClass == null) > { > // report added class > } > else if (currentClass == null) > { > // report removed class > } > else > { > // compare classes > } > >then a fair bit of code could be removed from clirr: > * ClassSetChangeCheck > * AddedClassCheck > * RemovedClassCheck > * AbstractClassSetChangeCheck > + members & methods from the Checker class. > > >I like the concept of "class set checks", but in the end, if there >aren't actually any tests that take advantage of this concept, it might >make sense to drop the idea. Of course if there *are* other "class set" >tests that may be applied, and I just haven't spotted them, then my >suggestion is rubbish. > >I hope you don't mind me proposing this.... > > > > Of course not - removing code without removing functionality is the best thing that can happen. Ultimately what I'd like to see is a unified interface for all kinds of checks. Problem is I couldn't come up with something that made sense when I started clirr. +1 for following your suggestion until inspiration hits us. Go ahead and delete all that stuff... Cheers, Lars |