Menu

#20 mtx file not correct

open
nobody
analyzer (15)
6
2005-01-16
2005-01-16
nb_
No

Consider the following piece of code:

class Local {

void f() {
new C() {
public void x() { }
};
}
}

The generated mtx file is: (without HitList)

File{
Name{ "Local.java" }
NrLines{ 11 }
NrStatements{ 1 }
NrCommentlines{ 0 }
Class{
Name{ "Local" }
InheritanceDepth{ 1 }
Method{
Name{ "x" }
NrReturns{ 0 }
NrStatements{ 1 }
MaxNestingDepth{ 0 }
CyclomaticComplexity{ 1 }
PathCount{ 1 }
IsPublic{ true }
IsPrivate{ false }
}
}
Class{
Name{ "C" }
InheritanceDepth{ 1 }
}
}

1) There is NO information for method f().
2) Bit strange that x is directly nested inside Class{
Name { "Local " } }.
Same thing happens when you create a new method and you add
a class declaration
to this method.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB