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

MultilineRecursiveToStringStyle StackOverflowError when object is an array

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5
    • 3.6
    • lang.builder.*
    • None

    Description

      MultilineRecursiveToStringStyle style = new MultilineRecursiveToStringStyle();
      String result = ToStringBuilder.reflectionToString(new String[]

      {"1","2"}

      , style);

      java.lang.StackOverflowError
      at org.apache.commons.lang3.builder.ToStringStyle.appendStart(ToStringStyle.java:409)
      at org.apache.commons.lang3.builder.ToStringBuilder.<init>(ToStringBuilder.java:262)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.<init>(ReflectionToStringBuilder.java:481)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:300)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:157)
      at org.apache.commons.lang3.builder.RecursiveToStringStyle.appendDetail(RecursiveToStringStyle.java:74)
      at org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle.reflectionAppendArrayDetail(MultilineRecursiveToStringStyle.java:142)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.reflectionAppendArray(ReflectionToStringBuilder.java:633)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java:538)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:711)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:301)
      at org.apache.commons.lang3.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java:157)
      at org.apache.commons.lang3.builder.RecursiveToStringStyle.appendDetail(RecursiveToStringStyle.java:74)
      at org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle.reflectionAppendArrayDetail(MultilineRecursiveToStringStyle.java:142)

      Attachments

        Activity

          People

            dmjones500 Duncan Jones
            sergpro Sergiy Proskuryakov
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: