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

Replace uses of StringBuffer with StringBuilder. #191

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

turbanoff
Copy link

@turbanoff turbanoff commented Nov 26, 2024

StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance. It's quite important for performance in fresh versions of Java which disabled/removed biased locking.

mvn verify

[INFO] Reactor Summary for xalan-j 2.7.3:
[INFO]
[INFO] xalan-j ............................................ SUCCESS [  7.420 s]
[INFO] @xsl.usage taglet JDK9+ ............................ SUCCESS [  2.443 s]
[INFO] Apache XML Serializer .............................. SUCCESS [  8.457 s]
[INFO] Apache Xalan-Java .................................. SUCCESS [ 13.493 s]
[INFO] Apache Xalan-Java Samples .......................... SUCCESS [  1.630 s]
[INFO] Apache Xalan-Java Servlet Sample ................... SUCCESS [  1.972 s]
[INFO] Apache Xalan-Java Applet Sample .................... SUCCESS [  1.223 s]
[INFO] Apache Xalan-Java Brazil Sample .................... SUCCESS [  1.036 s]
[INFO] Apache Xalan-Java XSLTC EJB sample ................. SUCCESS [  1.127 s]
[INFO] Apache Xalan-Java Compiled Servlet Sample .......... SUCCESS [  1.062 s]
[INFO] distribution ....................................... SUCCESS [  3.989 s]
[INFO] integration-tests .................................. SUCCESS [ 10.612 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  54.606 s
[INFO] Finished at: 2024-11-26T10:03:43+03:00

StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance.
It's quite important for performance in fresh versions of Java which disabled/removed biased locking.
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.

1 participant