Skip to content

Scout/java 5 features #2106

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

winfriedgerlach
Copy link
Collaborator

If we cannot go for Java 8 features yet, we can at least leverage Java 5 features.
Here is the first of some modernization PRs

@winfriedgerlach winfriedgerlach requested a review from dghgit August 7, 2025 09:24
@dghgit dghgit self-assigned this Aug 12, 2025
@silviuburceadev
Copy link

I'm just wondering if one needs to worry about thread safety on the switch from StringBuffer to StringBuilder in all these classes.

@winfriedgerlach
Copy link
Collaborator Author

winfriedgerlach commented Aug 13, 2025

@silviuburceadev I was careful and only changed from StringBuffer to StringBuilder when the StringBuilder was created in the same method and the result of the StringBuilder was also "consumed" in the same method - i.e. sb.toString() was called.

In cases where something else was done with StringBuffer (e.g., stored in a field, returned from method etc.) I didn't touch it exactly for the reason that you have in mind.

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