1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Author: Kai-Chung Yan <seamlikok@gmail.com>
Last-Update: 2016-07-26
Description: List<>::get(int) returns java.lang.Object?
Magically the Java compiler complains that java.utils.List<> returns a
java.lang.Object. This patch does the type cast for it.
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
@@ -37,7 +37,7 @@
// call to accept()
final MethodVisitor lfa = new LabelFlowAnalyzer();
for (int i = method.tryCatchBlocks.size(); --i >= 0;) {
- method.tryCatchBlocks.get(i).accept(lfa);
+ ((org.objectweb.asm.tree.TryCatchBlockNode)(method.tryCatchBlocks.get(i))).accept(lfa);
}
method.instructions.accept(lfa);
}
|