Skip to content

Commit

Permalink
KotlinWhenFilter should be stateless (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Aug 20, 2018
1 parent 1cd039a commit 1e01244
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ public final class KotlinWhenFilter implements IFilter {

private static final String EXCEPTION = "kotlin/NoWhenBranchMatchedException";

private final Matcher matcher = new Matcher();

public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
final Matcher matcher = new Matcher();
for (AbstractInsnNode i = methodNode.instructions
.getFirst(); i != null; i = i.getNext()) {
matcher.match(i, output);
Expand Down
3 changes: 2 additions & 1 deletion org.jacoco.doc/docroot/doc/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ <h3>New Features</h3>
<code>when</code> expressions that list all cases of <code>enum</code> or
<code>sealed class</code> is filtered out during generation of report
(GitHub <a href="https://github.com/jacoco/jacoco/issues/721">#721</a>,
<a href="https://github.com/jacoco/jacoco/issues/729">#729</a>).</li>
<a href="https://github.com/jacoco/jacoco/issues/729">#729</a>,
<a href="https://github.com/jacoco/jacoco/issues/749">#749</a>).</li>
<li>Additional bytecode generated by Kotlin compiler for <code>when</code>
expressions on <code>kotlin.String</code> values is filtered out during
generation of report
Expand Down

0 comments on commit 1e01244

Please sign in to comment.