GitHub user jwagenleitner opened a pull request: https://github.com/apache/incubator-groovy/pull/188
JSON CharScanner cleanup While looking into some other issues I noticed quite a few unused methods in the `CharScanner` class. Even though the class and it's methods are public, since it's in an `internal` named package it seems that it would be ok to treat it as non-public facing API ([I asked on the dev list] (http://mail-archives.apache.org/mod_mbox/incubator-groovy-dev/201511.mbox/%3CCAJ2HCd-ZcuZ%2BD6WUjjVAat8thEmibzW-9y1MchPz3cRR-yVdJg%40mail.gmail.com%3E)). Changes: 1. Removed all methods (and those that were left unused after their removal) that were not referenced anywhere in the entire project or were only referenced in the `CharScannerTest` class as the method under test. 1. Removed unused class variables 1. Removed duplicate code in `parseIntFromTo`, both branches of `if` had same code 1. Added additional tests for `parseIntFromTo` to make sure changes above were ok 1. Removed unneeded `final` modifier from static method 1. Removed `== true` in boolean checks 1. Removed one and only call to `#parseBigDecimal(char[], int, int)` in order to remove it since was only referenced in same class and `BigDecimal` constructor offers the same signature. Besides ensuring a `./gradlew clean test` passed I also did some testing against various large json payloads (https://github.com/jwagenleitner/groovy-json-tests) to make they all parsed successfully. I know it's a lot of change (deletions) but wanted to offer the PR for consideration. You can merge this pull request into a Git repository by running: $ git pull https://github.com/jwagenleitner/incubator-groovy json-cleanup Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-groovy/pull/188.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #188 ---- commit 1d41cd37ad27f105be6251e9b08d60dd90270e88 Author: John Wagenleitner <john.wagenleit...@gmail.com> Date: 2015-11-14T19:24:50Z JSON CharScanner cleanup Removed unused methods/variables and methods that were only referenced as test subjects. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---