Skip to content

Commit

Permalink
pmd: added another test case for the parser
Browse files Browse the repository at this point in the history
  • Loading branch information
adangel committed Jun 11, 2012
1 parent bdb16fb commit f89c68a
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,30 @@ Class getByteArrayClass() {
return (byte[].class);
}
}

/**
* Test case from http://jira.codehaus.org/browse/MPMD-126
*/
class PmdTestParent {
public PmdTestParent(Object obj) {}
}

class PmdTestChild extends PmdTestParent {

public PmdTestChild() {
// the following line produced a parsing problem
super(new Object() {

public Object create() {

Object memoryMonitor = null;

if (memoryMonitor == null) {
memoryMonitor = new Object();
}

return memoryMonitor;
}
});
}
}

0 comments on commit f89c68a

Please sign in to comment.