Skip to content

Missing Code Coverage for Lambda Expression#232

Merged
marchof merged 1 commit intomasterfrom
issue-232
Aug 21, 2014
Merged

Missing Code Coverage for Lambda Expression#232
marchof merged 1 commit intomasterfrom
issue-232

Conversation

@marchof
Copy link
Copy Markdown
Member

@marchof marchof commented Aug 20, 2014

The body of a Java 8 lambda expressions are completely ignored and therefore do not show code coverage at all. See reproducer with original report on mailing list.

The reason is that lambda expressions get "unsugared" into synthetic methods, which are generally ignored by JaCoCo.

@marchof marchof added this to the 0.7.2 milestone Aug 20, 2014
@marchof marchof self-assigned this Aug 20, 2014
@marchof
Copy link
Copy Markdown
Member Author

marchof commented Aug 20, 2014

The attached PR fixes the issue by not ignoring synthetic method starting with "lambda$".

@buildhive
Copy link
Copy Markdown

Java Code Coverage Tools » jacoco #294 SUCCESS
This pull request looks good
(what's this?)

marchof added a commit that referenced this pull request Aug 21, 2014
Missing Code Coverage for Lambda Expression
@marchof marchof merged commit 612efa1 into master Aug 21, 2014
@marchof marchof deleted the issue-232 branch August 21, 2014 07:38
@jacoco jacoco locked and limited conversation to collaborators Jan 11, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

component: core type: bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants