Search code examples
javaappendapache-commonstostring

ToStringBuilder append X appendSuper


in my classes when writing the toString() method I always use the ToStringBuilder from org.apache.commons

And when I'm extending other classes I use appendSuper() and then my appends

The question:

Are there are any real differences in doing:

appendSuper(super.toString())

instead of

append(super.toString())

Kind of dummy question.

Cheers


Solution

  • A ToStringStyle implementation can render it differently when appendSuper is called from append. No implementation of Apache commons lang 2.4 does it.