RFR: 8267355: Adjust the parameters of the method UnicodeReader#digit

Guoxiong Li gli at openjdk.java.net
Wed May 19 06:49:00 UTC 2021


Hi all,

This patch removes the parameter `int pos` of the method `UnicodeReader#digit`. Several places which use the method `UnicodeReader#digit` are adjusted, too.

Thank you for taking the time to review.

---

A related issue for comments.

After merging this patch, the methods `JavaTokenizer#scanLitChar` and `JavaTokenizer#scanDigits` also have the unused parameters `int pos`. It seems that they could be removed, too.
But I consider that the methods `scan***` of the class  `JavaTokenizer` have a context which may look ahead or back. So their parameters `int pos` may be used in the future. Maybe it is good to remain them.

What's your opionion? Any idea is appreciated.

---

Best Regards,
-- Guoxiong

-------------

Commit messages:
 - 8267355: Adjust the parameters of the method UnicodeReader#digit

Changes: https://git.openjdk.java.net/jdk/pull/4106/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4106&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8267355
  Stats: 13 lines in 2 files changed: 0 ins; 1 del; 12 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4106.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4106/head:pull/4106

PR: https://git.openjdk.java.net/jdk/pull/4106


More information about the compiler-dev mailing list