diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/ClassStats.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/ClassStats.java index 7bc3c144e7..0360f28916 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/ClassStats.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/ClassStats.java @@ -173,38 +173,6 @@ import net.sourceforge.pmd.lang.java.oom.signature.OperationSignature; } - /** - * Finds the declaration nodes of all methods or constructors that are declared inside a class. - * - * @param node The class in which to look for. - * @param includeNested Include operations found in nested classes? - * - * @return The list of all operations declared inside the specified class. - * - * TODO:cf this one is computed every time - */ - private static List findOperations(ASTAnyTypeDeclaration node, - boolean includeNested) { - - if (includeNested) { - return node.findDescendantsOfType(ASTMethodOrConstructorDeclaration.class); - } - - List outerDecls - = node.jjtGetChild(0).findChildrenOfType(ASTClassOrInterfaceBodyDeclaration.class); - - - List operations = new ArrayList<>(); - - for (ASTClassOrInterfaceBodyDeclaration decl : outerDecls) { - if (decl.jjtGetChild(0) instanceof ASTMethodOrConstructorDeclaration) { - operations.add((ASTMethodOrConstructorDeclaration) decl.jjtGetChild(0)); - } - } - return operations; - } - - /** * Computes the value of a metric for an operation. * diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/api/OperationMetricKey.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/api/OperationMetricKey.java index 12813d6241..126aabef1c 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/api/OperationMetricKey.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/oom/api/OperationMetricKey.java @@ -20,28 +20,28 @@ public enum OperationMetricKey implements MetricKey