On Thu, 7 Nov 2002, Henri Yandell wrote: > Looking at the PMD report of Commons Collections, I've fixed the blatant > errors [see: > http://pmd.sourceforge.net/reports/jakartacommons_jakarta-commons.html] > > It still leaves a lot in the Tests which are basically: > > try { > Object obj = someTest(); > } catch(ExpectedException ee) { > ... > } > > It thinks these should be: > > try { > someTest(); > } catch(... > > So. Does anyone mind if I go through and remove all the variable naming? > Is it doing any real service [all it shows is return type, rtfjdoc]?
One benefit to this is that if the signature changes (i.e. the return type), then the assignment won't compile. In a way, reminding the developer that changing the return type breaks things. Without the assignment, there is no typecheck. But really, I don't think that's much of an argument because there really should be some other test that's implicitly checking the return type when it tests that the method returns an expected result. So I'm fine with removing the unused variables. regards, michael -- Michael A. Smith [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>
