Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update KotlinDefaultArgumentsFilter for Kotlin 1.5 #1162

Merged
merged 2 commits into from Mar 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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