Skip to content

Commit 9d5c074

Browse files
committed
It is possible to invoke methods on Type array objects (Type[].clone()).
This modification means Type[].clone() and Type.clone() are seen as separate methods.
1 parent 02d2a6f commit 9d5c074

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/main/java/nl/rug/jbi/jsm/bcel/InvokeMethodInstr.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ public String getClassName() {
7070
return type2className(this.instruction.getReferenceType(this.cp));
7171
}
7272

73+
/**
74+
* @return A string representing the EXACT type of the class as BCEL reports it.
75+
*/
76+
public String getExactClassName() {
77+
return this.instruction.getReferenceType(this.cp).getSignature();
78+
}
79+
7380
/**
7481
* @return Name of the invoked method.
7582
*/

src/main/java/nl/rug/jbi/jsm/metrics/ckjm/RFC.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void onInvokeMethod(final MetricState state, final InvokeMethodInstr inst
5151

5252
final String signature = String.format(
5353
"%s.%s(%s)",
54-
instr.getClassName(),
54+
instr.getExactClassName(),
5555
instr.getMethodName(),
5656
Joiner.on(',').join(instr.getExactArgumentTypes())
5757
);

0 commit comments

Comments
 (0)