Skip to content

Missing Code Coverage for Lambda Expression #232

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

Merged
merged 1 commit into from
Aug 21, 2014
Merged

Missing Code Coverage for Lambda Expression #232

merged 1 commit into from
Aug 21, 2014

Conversation

marchof
Copy link
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
Member Author

marchof commented Aug 20, 2014

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

@buildhive
Copy link

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