github-java-client icon indicating copy to clipboard operation
github-java-client copied to clipboard

BUG SearchIssue id can be bigger than Integer.MAX

Open vootelerotov opened this issue 1 year ago • 4 comments

Represent it as Long instead of Integer.

For schema (where id is specified as 'int64') see:

https://docs.github.com/en/rest/search/search?apiVersion=2022-11-28#search-issues-and-pull-requests

vootelerotov avatar Feb 22 '24 05:02 vootelerotov

Ran into this in the wild.

vootelerotov avatar Feb 22 '24 05:02 vootelerotov

Hmm, build is failing with Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 65 -- not sure if this is related to my change-set?

vootelerotov avatar Feb 22 '24 05:02 vootelerotov

It seems that a lot of PR-s now have ID-s that are bigger than Integer.MAX, quite easy to run into this in wild now.

vootelerotov avatar Feb 26 '24 15:02 vootelerotov

Comment ID could have the same integer overflow. e.g. https://api.github.com/repos/Azure/azure-sdk-for-java/issues/comments/2188169837

It maybe safer to convert all ID of int type to long type.

weidongxu-microsoft avatar Jun 25 '24 07:06 weidongxu-microsoft

Also ran into this.

neeme-praks-sympower avatar Sep 26 '24 07:09 neeme-praks-sympower