Integrated: 2279: Improve JSONNumber::asInt usage to prevent future break

Zhao Song zsong at openjdk.org
Fri Jun 7 17:32:01 UTC 2024


On Thu, 6 Jun 2024 21:24:09 GMT, Zhao Song <zsong at openjdk.org> wrote:

> [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

This pull request has now been integrated.

Changeset: 3f7de91f
Author:    Zhao Song <zsong at openjdk.org>
URL:       https://git.openjdk.org/skara/commit/3f7de91f35ee79c32d79f2d57ac550152f710fc1
Stats:     25 lines in 6 files changed: 0 ins; 0 del; 25 mod

2279: Improve JSONNumber::asInt usage to prevent future break

Reviewed-by: erikj

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

PR: https://git.openjdk.org/skara/pull/1657


More information about the skara-dev mailing list