Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64-bit id support #393

Closed
Raimmaster opened this issue Nov 2, 2017 · 7 comments
Closed

64-bit id support #393

Raimmaster opened this issue Nov 2, 2017 · 7 comments

Comments

@Raimmaster
Copy link

When working with the GitHub statuses API, it appears that IDs that surpass the 32-bit mark it throws the following exception:
com.fasterxml.jackson.core.JsonParseException: Numeric value (x) out of range of int.
I haven't checked if it goes all the way to the jackson-core project, but the status IDs now generated have gone past 4294967295, which is the maximum uint value.

It'd be great if we could fix this, and I'd be happy to do the pull request if given some pointers and pairing. Thanks beforehand.

@johnou
Copy link
Collaborator

johnou commented Nov 2, 2017

Integer.MAX_VALUE in Java is 2147483647, to fix this all "id" fields for data transfer objects used by jackson will need to be changed to long.

@johnou
Copy link
Collaborator

johnou commented Nov 2, 2017

https://github.com/kohsuke/github-api/blob/master/src/main/java/org/kohsuke/github/GHObject.java#L28 already has long for id, @Raimmaster can you provide a full error message / stacktrace please?

@Raimmaster
Copy link
Author

Yes, that's why I said that it even surpassed the maximum uint value. Regardless, the change must be done in both repos, right? Or am I mistaken in that sense?

@johnou
Copy link
Collaborator

johnou commented Nov 2, 2017

both repos? 7735ede was committed 10 days ago, are you running github-api-1.90?

@Raimmaster
Copy link
Author

Give me a moment. We're working with sonarqube, so apparently it is also using the github-api version you mentioned: https://github.com/SonarSource/sonar-github/blob/master/pom.xml#L93

@Raimmaster
Copy link
Author

Sadly, the release has not been updated, and it's using the 1.76 version. https://github.com/SonarSource/sonar-github/releases/tag/1.4-rc1

@Raimmaster
Copy link
Author

Thanks, @johnou. I'll focus in updating the sonarcube's dependency version. Hopefully that'll solve it. Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants