You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jaswanth Bala (JIRA)" <ji...@apache.org> on 2018/01/04 07:14:00 UTC

[jira] [Created] (LANG-1374) Parsing Json Array failed

Jaswanth Bala created LANG-1374:
-----------------------------------

             Summary: Parsing Json Array failed
                 Key: LANG-1374
                 URL: https://issues.apache.org/jira/browse/LANG-1374
             Project: Commons Lang
          Issue Type: Bug
          Components: lang.builder.*
    Affects Versions: 3.6
            Reporter: Jaswanth Bala
            Priority: Trivial
             Fix For: 3.7, 3.6


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())



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)