yuhengfdada opened a new pull request, #1972:
URL: https://github.com/apache/groovy/pull/1972

   # Analysis
   As mentioned by Paul's comment in the jira, this is a bug in 
`JsonParserCharArray`. The problem does not exist in 
`JsonParserUsingCharacterSource`.
   After debugging through both classes, both parser methods look exactly the 
same, except that `CharacterSource` would automatically add a `10`(line feed) 
char at the end, which triggers an exception. But for `JsonParserCharArray` it 
ends right at the last curly brace so the exception is overlooked.
   # Fix
   To keep the behavior consistent across `JsonParserCharArray` and 
`JsonParserUsingCharacterSource`, a line feed character is added to the end of 
the char array on initialization of `JsonParserCharArray`.
   # Concern
   Performance


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to