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

bug in comments inside the lambda expression #2763

Closed
rihou opened this issue Nov 12, 2018 · 2 comments
Closed

bug in comments inside the lambda expression #2763

rihou opened this issue Nov 12, 2018 · 2 comments
Labels

Comments

@rihou
Copy link

rihou commented Nov 12, 2018

The comments in the lambda expression are reported to have errors.

An example code:

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class CommentInLambdaExpressionTest {

public static void main(String[] args) {
	CommentInLambdaExpressionTest test = new CommentInLambdaExpressionTest();
	List<Integer> lst = test.setup();
	System.out.println(lst);
}

public List<Integer> setup() {
	List<Integer> messages = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
	return messages.stream().filter( num -> 
	// comment in lambda expression
	num > 5
	).collect(Collectors.toList());
}
}

The code triggers the error:
2018-11-08 10:11:15,847 ERROR spoon.support.compiler.jdt.JDTCommentBuilder - "// comment in lambda expression" cannot be added into the AST, with parent class spoon.support.reflect.code.CtLambdaImplplease report the bug by posting on #2482

@pvojtechovsky
Copy link
Collaborator

Thank you for reporting 👍

@monperrus
Copy link
Collaborator

closed by #2801

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants