Skip to content

Conversation

@krzyk
Copy link
Contributor

@krzyk krzyk commented Dec 28, 2022

Converted few cases where new switch statements/expressions make the code more readable.
Few cases of multi line strings where converted to text blocks (unfortunately there is an issue of tabs/spaces because checkstyle doesn't know it is in textblock).

Also uses new methods to read strings directly.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 28, 2022
@sbrannen sbrannen self-assigned this Jan 6, 2023
@sbrannen sbrannen added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jan 6, 2023
@sbrannen sbrannen added this to the 6.0.4 milestone Jan 6, 2023
@sbrannen sbrannen changed the title Using new Java features (switch expressions, text blocks, new JDK methods) Use new Java features (switch expressions, text blocks, new JDK methods) Jan 9, 2023
@sbrannen sbrannen modified the milestones: 6.0.4, 6.0.5 Jan 10, 2023
Content-Length: 6\r
\r
myBody\r
""");
Copy link
Member

Choose a reason for hiding this comment

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

Instead of manually appending \r to every line in a text block, we prefer to write text blocks as "plain text" and then adjust the line endings only if necessary.

For example, in this particular case we would remove all \r entries and apply .replace("\n", "\r\n") to the text block.

NO need to make these changes in this PR though. I have already applied such changes locally which will be pushed to main along with your PR.

@sbrannen sbrannen closed this in afb8a0d Jan 11, 2023
@sbrannen
Copy link
Member

This has been merged into main in afb8a0d and slightly revised in 0415975 and a4956df.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: task A general task

3 participants