LANG-487 - Make default style thread-safe (better Javadoc)

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@831686 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2009-11-01 15:25:10 +00:00
parent a3e3a0b08f
commit de820ce189
1 changed files with 3 additions and 2 deletions

View File

@ -106,9 +106,10 @@ public class ToStringBuilder {
* It is recommended to pass a <code>ToStringStyle</code> to the constructor instead
* of using this global default.</p>
*
* <p>This method is not intended for use from multiple threads.
* <p>This method can be used from multiple threads.
* Internally, a <code>volatile</code> variable is used to provide the guarantee
* that the latest value set using {@link #setDefaultStyle} is the value returned.</p>
* that the latest value set using {@link #setDefaultStyle} is the value returned.
* It is strongly recommended that the default style is only changed during application startup.</p>
*
* <p>One reason for changing the default could be to have a verbose style during
* development and a compact style in production.</p>