title: EclEmma, Java8 and Lambda - no coverage on lambda expression
body: <p>I have a Java project under Eclipse Luna, with EclEmma  2.3.1.201405111647 (latest), which use Jacoco 0.7.1, which have support for Java 8 as stated in their <a href="http://www.eclemma.org/changes.html" rel="nofollow">changelog</a>:</p>
  
  <blockquote>
    <p>"Version 2.3.1 (2014/05/11)</p>
  
  <pre><code>Fixed ASM 5.0.1 dependency conflicts with new ASM bundles in Eclipse 4.4 (GitHub #83).
  Upgrade to JaCoCo 0.7.1 for full Java 8 support.
  </code></pre>
  </blockquote>
  
  <p>I now have the following toString:</p>
  
  <pre><code>  @Override
    public String toString() {
      // [BLOCK0]
      if (0 == value) {
        return "0B";
      }
      // [BLOCK1]
      final MutableLong val = new MutableLong(value);
      final StringBuilder sb = new StringBuilder();
      // [BLOCK2]
      Arrays.asList(TERA_BYTES, GIGA_BYTES, MEGA_BYTES, KILO_BYTES, BYTES).forEach(unit -&gt; {
        // [BLOCK3]
        long divider = unit.toBytes(1);
        long n = val.longValue() / divider;
        if (0 != n) {
          sb.append(n).append(unit.getUnitCharacter());
          val.subtract(n * divider);
        }
      });
      // [BLOCK4]
      return sb.toString();
    }
  </code></pre>
  
  <p>I won't put the Junit test, because I know it goes 100% coverage. I can prove it by moving the lamdba expression into a <code>appendToString</code> method, and remplace the <code>forEach</code> with a <em>for-each</em> <code>for (V value : Iterable&lt;V&gt;)</code>.</p>
  
  <p>The result is, when I do "Coverage as Junit Test", the following:</p>
  
  <ul>
  <li>BLOCK0 is all green</li>
  <li>BLOCK1 is all green</li>
  <li>BLOCK2 is green, up to the <code>forEach(unit -&gt; {</code></li>
  <li>BLOCK3 is white (as if it were ignored lines)</li>
  <li>BLOCK4 is all green.</li>
  </ul>
  
  <p>Can someone explain me why Jacoco can't detect coverage in lambda ?</p>