Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.1
-
None
Description
At the moment, ToStringBuilder internally uses a StringBuffer to create the output String. StringBuffer, as opposed to StringBuilder and StrBuilder, is synchronized. Since ToStringBuilder will almost never leave the toString()-method, the synchronization only adds overhead.
Since the ToStringBuilder API never suggests that ToStringBuilder is thread-safe, either the current implementation could be changed to use Str[ing]Builder or an alternative implementation could be provided.
Attachments
Issue Links
- relates to
-
LANG-833 ToStringBuilder should use StringBuilder
- Open