Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-372

ToStringBuilder: MULTI_LINE_STYLE does not print anything from appendToString methods.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.3
    • 2.4
    • None
    • None

    Description

      To reproduce, just use the following sample on an object:

      return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
      .appendToString(ob1.toString())
      .appendToString(ob2.toString())
      .append("something", something)
      .toString();

      You won't see the ob1.toString or the ob2.toString

      And this works correctly:

      return new ToStringBuilder(this)
      .appendToString(ob1.toString())
      .appendToString(ob2.toString())
      .append("something", something)
      .toString();

      Attachments

        1. LANG-327-test.patch
          1 kB
          Bjorn Townsend

        Activity

          People

            Unassigned Unassigned
            prophecy Travis Reeder
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: