Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The StringBuilder.append method invoked was StringBuilder.append(Object) as both String and Char are being returned. The implementation of StringBuilder.append(Object) when applied to a Character is essentially: * call Character.toString - which produces a one element char[] and then creates a new String with the char array, which in turn does a defensive copy of the buffer. * the string created is then used to add to the StringBuilder This PR changes JsonAST.appendEscapedString to use StringBuilder.append(Char) which directly inserts the character into the buffer avoiding the operations described above
- Loading branch information