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

review: fix: Use new line symbol from system also for BLOCK comments when printing #6052

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

GooDer
Copy link
Contributor

@GooDer GooDer commented Oct 31, 2024

I encounter small problem when I tried to output processed classes to disk.

There are comments which I think have sort of bad syntax

/* (non-Javadoc)
  @see com.some.package.SomeObject#getSomeField()
 */
@Transient
public Long getSomeField() {
.......
}

Due to missing 'star' in the middle line it is marked as BLOCK comment. Later during processing of printing of comments there is hardcoded CtComment.LINE_SEPARATOR for new lines which will not match rest of the class which is written with system specific new line symbol (windows \r\n\ in my case).

This will mark class as changed in Git due to this change in new line character.

Every where in comments in the code is written that these hardcoded new line \n should not affect how comments are rendered so I guess it is bug.

@GooDer GooDer changed the title Use new line symbol from system also for BLOCK comments when printing fix: Use new line symbol from system also for BLOCK comments when printing Oct 31, 2024
@GooDer GooDer changed the title fix: Use new line symbol from system also for BLOCK comments when printing review: fix: Use new line symbol from system also for BLOCK comments when printing Oct 31, 2024
@MartinWitt MartinWitt merged commit a2049a7 into INRIA:master Nov 2, 2024
13 checks passed
@MartinWitt
Copy link
Collaborator

Thanks @GooDer

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.

2 participants