aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc R. Hoffmann <hoffmann@mountainminds.com>2013-01-16 07:58:13 +0100
committerMarc R. Hoffmann <hoffmann@mountainminds.com>2013-01-16 07:58:59 +0100
commit08db74b0521a79b029493a1c1543385b9ce4c368 (patch)
treef2320150c1ab22f88713fdef52aee026aa194ac2
parent3c1cb3de0d44a6b41a9f255b25399dc345f5e791 (diff)
downloadjacoco-08db74b0521a79b029493a1c1543385b9ce4c368.tar.gz
New FAQ entry about reflection.
-rw-r--r--org.jacoco.doc/docroot/doc/faq.html17
1 files changed, 15 insertions, 2 deletions
diff --git a/org.jacoco.doc/docroot/doc/faq.html b/org.jacoco.doc/docroot/doc/faq.html
index c9bfee8d..1aa3716a 100644
--- a/org.jacoco.doc/docroot/doc/faq.html
+++ b/org.jacoco.doc/docroot/doc/faq.html
@@ -27,7 +27,7 @@
<p>
See <a href="integrations.html">this list</a> for current integrations with
various tools.
-<p>
+</p>
<h3>Why do I get the error "Can't add different class with same name"?</h3>
<p>
@@ -35,7 +35,7 @@
names. You get this error during report generation if JaCoCo is supplied with
multiple different class files with the same name. To fix this remove those
duplicate classes or create separate reports or report groups for each version.
-<p>
+</p>
<h3>Code with exceptions shows no coverage. Why?</h3>
<p>
@@ -92,6 +92,19 @@
reset execution data.
</p>
+<h3>My code uses reflection. Why does it fail when I execute it with JaCoCo?</h3>
+<p>
+ To collect execution data JaCoCo instruments the classes under test which adds
+ two members to the classes: A private static field <code>$jacocoData</code>
+ and a private static method <code>$jacocoInit()</code>. Both members are
+ marked as synthetic.
+</p>
+<p>
+ Please change your code to ignore synthetic members. This is a good practice
+ anyways as also the Java compiler creates synthetic members in certain
+ situation.
+</p>
+
</div>
<div class="footer">
<span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>