RFR: 2279: Improve JSONNumber::asInt usage to prevent future break
Zhao Song
zsong at openjdk.org
Thu Jun 6 21:33:56 UTC 2024
[SKARA-2277](https://bugs.openjdk.org/browse/SKARA-2277) is an instance of a breakage caused by improper usage of JSONNumber::asInt. In our project, there are other usages of JSONNumber::asInt, we should clean them up to prevent future break.
As Erik said, he thinks it's fine to treat user ids and repository ids as int.
Here are the other 2 places that might break.
GitLabRepository::toCommitComment treats note ids as int.
GitHubPullRequest::reviews treats review ids as int.
Besides, I changed the type of id from int to String in Review.java
-------------
Commit messages:
- update
- SKARA-2279
Changes: https://git.openjdk.org/skara/pull/1657/files
Webrev: https://webrevs.openjdk.org/?repo=skara&pr=1657&range=00
Issue: https://bugs.openjdk.org/browse/SKARA-2279
Stats: 25 lines in 6 files changed: 0 ins; 0 del; 25 mod
Patch: https://git.openjdk.org/skara/pull/1657.diff
Fetch: git fetch https://git.openjdk.org/skara.git pull/1657/head:pull/1657
PR: https://git.openjdk.org/skara/pull/1657
More information about the skara-dev
mailing list