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

Parsing Json Array failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.7
    • 3.8
    • lang.builder.*
    • None
    • Patch, Important

    Description

      In ToStringStyle class, which checking if a string is a valid Json array, the boolean check was wrong.
      original:

              private boolean isJsonArray(final String valueAsString) {
                  return valueAsString.startsWith(getArrayStart())
                          && valueAsString.startsWith(getArrayEnd());
              }
      

      The second expression should be valueAsString.endsWith(getArrayEnd())

      Attachments

        Activity

          People

            kinow Bruno P. Kinoshita
            jaswanth Jaswanth Bala
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified