On Wed, 30 Jun 2004 ggregory@apache.org wrote:
> PR: http://issues.apache.org/bugzilla/show_bug.cgi?id=27876
> [lang] ReflectionToStringBuilder.toString(null) throws exception by design
> ReflectionToStringBuilder.toString is now null-safe and returns the style's nullText.
> ToStringBuilder constructors are now null-safe. A new ToStringBuilder on a null followed by a call to toString returns "".
you didn't update all the javadoc. for example:
> Index: ToStringStyle.java
> ===================================================================
> RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ToStringStyle.java,v
> retrieving revision 1.29
> retrieving revision 1.30
> diff -u -r1.29 -r1.30
> --- ToStringStyle.java 18 Feb 2004 22:53:24 -0000 1.29
> +++ ToStringStyle.java 30 Jun 2004 18:21:49 -0000 1.30
> @@ -234,11 +234,13 @@
> * toString for, must not be null
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
here.
> */
> public void appendStart(StringBuffer buffer, Object object) {
> - appendClassName(buffer, object);
> - appendIdentityHashCode(buffer, object);
> - appendContentStart(buffer);
> - if (fieldSeparatorAtStart) {
and shouldn't a new ToStringBuilder on null create the nullText, not ""?
--scott
mustard Milosevic Waihopai early warning Uzi BATF Secretary Justice
agent Indonesia Marxist non-violent protest MI6 munitions payment
( http://cscott.net/ )
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org