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

[java] Recommend StringBuilder next to StringBuffer #1206

Merged
merged 1 commit into from Jun 25, 2018

Conversation

Projects
None yet
2 participants
@krichter722
Contributor

krichter722 commented Jun 24, 2018

  • The PR is submitted against master. The PMD team will merge back to support branches as needed.
  • ./mvnw test passes.
  • ./mvnw pmd:check passes.
  • ./mvnw checkstyle:check passes. Check this for more info

There seems to be some confusion about the use of ./mvnw test which fails with OpenJDK 8 because 9 is enforced and causes test failures even on master with 9.

PR Description:
StringBuilder is a faster non-synchronized alternative to StringBuffer
which should be used where synchronization is not needed. Since "use
StringBuilder or StringBuffer" would immediately lead to the question
which one to use the hints "non-synchronized" and "synchronized" are
added.

Recommend StringBuilder next to StringBuffer
StringBuilder is a faster non-synchronized alternative to StringBuffer
which should be used where synchronization is not needed. Since "use
StringBuilder or StringBuffer" would immediately lead to the question
which one to use the hints "non-synchronized" and "synchronized" are
added.

@oowekyala oowekyala merged commit 28505a8 into pmd:master Jun 25, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

oowekyala added a commit that referenced this pull request Jun 25, 2018

@oowekyala

This comment has been minimized.

Member

oowekyala commented Jun 25, 2018

Merged, thanks!

@krichter722 krichter722 deleted the krichter722:string-buffer-recommendation branch Jul 26, 2018

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