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

fix(PositionBuilder): fix lambda parameters position #3137

Merged
merged 2 commits into from
Oct 7, 2019

Conversation

nharrand
Copy link
Collaborator

@nharrand nharrand commented Oct 6, 2019

merge #3135
fix ASSERT-KTH/sorald#22 hopefully?

@@ -224,8 +224,8 @@ SourcePosition buildPositionCtElement(CtElement e, ASTNode node) {

// Handle lambda parameters without explicit type
if (variableDeclaration instanceof Argument && variableDeclaration.type == null) {
declarationSourceStart = findPrevNonWhitespace(contents, 0, declarationSourceStart - 1);
declarationSourceEnd = findNextNonWhitespace(contents, contents.length - 1, declarationSourceEnd + 1);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pvojtechovsky was there a reason for declarationSourceStart - 1 and declarationSourceEnd + 1 that I am missing?

@monperrus
Copy link
Collaborator

LGTM

@HarisAdzemovic
Copy link
Contributor

Can confirm that it fixes https://github.com/kth-tcs/sonarqube-repair/pull/22

@monperrus monperrus merged commit f49b43d into INRIA:master Oct 7, 2019
@monperrus
Copy link
Collaborator

Thanks a lot!

HarisAdzemovic added a commit to ASSERT-KTH/sorald that referenced this pull request Oct 7, 2019
Fix INRIA/spoon#3137 is vital for sniper mode.
Use this local version (cloned Spoon 2019-10-07) until the fix is included
in Maven. Current latest Maven release (which doesn't include the fix) is
7.6.0-beta-4.
@monperrus monperrus mentioned this pull request Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants