forked from phoedos/pmd
Fix for 1501: CyclomaticComplexity rule causes OOM when class reporting is disabled
This commit is contained in:
Frits Jalvingh
committed by
Andreas Dangel
parent
553cafff6e
commit
afc0f25795
@ -166,8 +166,8 @@ public Object visit(ASTClassOrInterfaceDeclaration node, Object data) {
|
||||
|
||||
entryStack.push( new Entry( node ) );
|
||||
super.visit( node, data );
|
||||
Entry classEntry = entryStack.pop();
|
||||
if ( showClassesComplexity ) {
|
||||
Entry classEntry = entryStack.pop();
|
||||
if ( classEntry.getComplexityAverage() >= reportLevel
|
||||
|| classEntry.highestDecisionPoints >= reportLevel ) {
|
||||
addViolation( data, node, new String[] {
|
||||
|
Reference in New Issue
Block a user