Doing a JUnit review - checking tests with low coverage for what they're missing

ArrayIsStoredDirectly is documented as finding constructors, as well as methods, but only methods were tested. Adding a constructor to the test revealed a failed JUnit test - fixed rule.


git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4633 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Allan Caplan
2006-10-13 01:37:33 +00:00
parent 1aa75f9540
commit 8189d97f05

View File

@ -76,7 +76,7 @@ public abstract class AbstractSunSecureRule extends AbstractRule {
* @param node the ASTMethodDeclaration where the local variable name will be searched
* @return <code>true</code> if the method declaration contains any local variable named vn and <code>false</code> in other case
*/
protected boolean isLocalVariable(String vn, ASTMethodDeclaration node) {
protected boolean isLocalVariable(String vn, SimpleNode node) {
final List lvars = node.findChildrenOfType(ASTLocalVariableDeclaration.class);
if (lvars != null) {
for (Iterator it = lvars.iterator(); it.hasNext();) {