Cobertura uses Offline byte code instrumentation, which means it will add instructions after the compilation into the byte-code. I have a very large generated method which now I'm trying to refactor. Itself is under 64KB JVM limitation, but after being added more byte code by cobertura, it will cause the oversize error. I'm asking this question to decide how to refactor the method generating logic.
Asked
Active
Viewed 107 times
1 Answers
1
A simple workaround could be to just exclude your generated classes or specific methods from Cobertura instrumentation.

Eugene Kuleshov
- 31,461
- 5
- 66
- 67
-
Thanks! Could you suggest how to do that? – Edmond Sep 10 '13 at 21:00
-
See excludeClasses in Cobertura documentation, as well as @CoverageIgnore annotation. https://github.com/cobertura/cobertura/wiki/Ant-Task-Reference – Eugene Kuleshov Sep 12 '13 at 14:15