mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-12 21:15:05 +00:00
LANG-487 - Make default style thread-safe (better Javadoc)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@830040 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bf626b85ba
commit
77e3dcc393
@ -106,7 +106,9 @@ 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 thread-safe, as a <code>volatile</code variable is used internally.</p>
|
||||
* <p>This method is not intended for use 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>
|
||||
*
|
||||
* <p>One reason for changing the default could be to have a verbose style during
|
||||
* development and a compact style in production.</p>
|
||||
@ -125,7 +127,9 @@ public static ToStringStyle getDefaultStyle() {
|
||||
* It is recommended to pass a <code>ToStringStyle</code> to the constructor instead
|
||||
* of changing this global default.</p>
|
||||
*
|
||||
* <p>This method is thread-safe, as a <code>volatile</code variable is used internally.</p>
|
||||
* <p>This method is not intended for use from multiple threads.
|
||||
* Internally, a <code>volatile</code> variable is used to provide the guarantee
|
||||
* that the latest value set is the value returned from {@link #getDefaultStyle}.</p>
|
||||
*
|
||||
* @param style the default <code>ToStringStyle</code>
|
||||
* @throws IllegalArgumentException if the style is <code>null</code>
|
||||
|
Loading…
x
Reference in New Issue
Block a user