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

LexicalPreservingPrinter Difference Algorithm breaks indentation after adding identical statements. #2203

Closed
moraispgsi opened this issue Apr 28, 2019 · 1 comment

Comments

@moraispgsi
Copy link
Contributor

moraispgsi commented Apr 28, 2019

When using the LexicalPreservingPrinter, adding a statement identical to the previous statement breaks the Difference Algorithm because it confuses it, it makes it believe that the first statement was the one that was added, as a consequence the indentation breaks.

Will be submitting a PR for this with a test case.

@moraispgsi moraispgsi changed the title Adding an IfStmt to a method should add indentation LexicalPreservingPrinter Difference Algorithm breaks indentation after adding identical statements. Apr 28, 2019
moraispgsi added a commit to TQRG/javaparser that referenced this issue Apr 28, 2019
matozoid added a commit to TQRG/javaparser that referenced this issue Sep 18, 2019
matozoid added a commit to TQRG/javaparser that referenced this issue Jan 5, 2020
MysterAitch added a commit to TQRG/javaparser that referenced this issue Apr 19, 2020
MysterAitch added a commit to TQRG/javaparser that referenced this issue Nov 14, 2020
@jlerbsc
Copy link
Collaborator

jlerbsc commented Nov 22, 2022

I close this issue because actually all these tests pass int the current version.

@jlerbsc jlerbsc closed this as completed Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants