Skip to content

MessageBuilder: fix typo#688

Open
stokito wants to merge 3 commits intoigniterealtime:masterfrom
stokito:message_builder
Open

MessageBuilder: fix typo#688
stokito wants to merge 3 commits intoigniterealtime:masterfrom
stokito:message_builder

Conversation

@stokito
Copy link
Member

@stokito stokito commented Oct 19, 2025

Also cleanup MessageTest

Copy link
Member

@Flowdalic Flowdalic left a comment

Choose a reason for hiding this comment

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

I don't see the point in switching to String concatenation over StringBuilder. Yes, javac will probably transform String concatenation to StringBuilder and yes, one could argue it's slightly more readable. But am I not convinced that it's worth to change.

In general, please make sure that you don't conflate multiple changes within the same commit (or even, within the same PR). This makes it easier to review stuff, keeps the history clean and increases the chances for undisputed changes to land.

@stokito
Copy link
Member Author

stokito commented Nov 11, 2025

javac will probably transform String concatenation to StringBuilder and yes, one could argue it's slightly more readable

The javac will use concatenation with invokedynamic that potentially may be more optimized because pre-allocates buffer with full length. I changed the code because the IntelliJ proposed the change and it makes it automatically. There is a lot of places where the same change can be applied with one click. Similar warnings may be reported by source quality control systems like Sonarqube and this will make it easier to find more important error. It also minimizes potential errors on code change. There are other places where the IDE can refresh and improve code just automatically with 100% correctness. I just debugged the class a lot and made the cleanup for myself then decided to make a PR on it.

@stokito stokito requested a review from Flowdalic December 22, 2025 22:33
@Flowdalic
Copy link
Member

I am still skeptical that switching from StringBuilder to string concat is worth it considering that we are talking about test code. That said, I agree that new code should prefer string concat over StringBuilder when sensibe.

@stokito
Copy link
Member Author

stokito commented Dec 23, 2025

I removed the commit with he StringBuilder

@Flowdalic
Copy link
Member

I removed the commit with he StringBuilder

There is still an unrelated change in the commit

@stokito
Copy link
Member Author

stokito commented Feb 28, 2026

I fixed your comments. Also I noticed that some links to XEPs are outdated with JEP-XXXX.html. Others use http:// instead of the https://. Fixed these links and added to the PR.

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