Skip to content

Commit

Permalink
Update KotlinDefaultArgumentsFilter for Kotlin 1.5 (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
Godin committed Mar 15, 2021
1 parent 66b5fa9 commit d9296f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Expand Up @@ -82,7 +82,7 @@ public void filter(final MethodNode methodNode,
private static class Matcher extends AbstractMatcher {
public void match(final MethodNode methodNode,
final IFilterOutput output, final boolean constructor) {
cursor = methodNode.instructions.getFirst();
cursor = skipNonOpcodes(methodNode.instructions.getFirst());

nextIs(Opcodes.IFNULL);
nextIsType(Opcodes.NEW, "java/lang/UnsupportedOperationException");
Expand All @@ -102,7 +102,7 @@ public void match(final MethodNode methodNode,
output.ignore(methodNode.instructions.getFirst(), cursor);
next();
} else {
cursor = methodNode.instructions.getFirst();
cursor = skipNonOpcodes(methodNode.instructions.getFirst());
}

final Set<AbstractInsnNode> ignore = new HashSet<AbstractInsnNode>();
Expand Down
3 changes: 3 additions & 0 deletions org.jacoco.doc/docroot/doc/changes.html
Expand Up @@ -33,6 +33,9 @@ <h3>New Features</h3>
<li>Branches added by the Kotlin compiler version 1.4.20 and above for suspending
lambdas are filtered out during generation of report
(GitHub <a href="https://github.com/jacoco/jacoco/issues/1149">#1149</a>).</li>
<li>Branches added by the Kotlin compiler version 1.5.0 and above for functions
with default arguments are filtered out during generation of report
(GitHub <a href="https://github.com/jacoco/jacoco/issues/1162">#1162</a>).</li>
<li>Improved filtering of bytecode generated by Kotlin compiler for
<code>when</code> expressions on <code>kotlin.String</code> values
(GitHub <a href="https://github.com/jacoco/jacoco/issues/1156">#1156</a>).</li>
Expand Down

0 comments on commit d9296f7

Please sign in to comment.