File: org.jacoco.core.internal.flow.LabelFlowAnalyzer_tryCatchBlocks.patch

package info (click to toggle)
jacoco 0.7.8-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,532 kB
  • ctags: 5,043
  • sloc: java: 27,006; xml: 4,801; sh: 7; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 748 bytes parent folder | download | duplicates (2)
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
@@ -36,7 +36,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);
 	}