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

Fix unsigned long printing in requests (#1119) #1129

Merged
merged 2 commits into from
Apr 2, 2024

Conversation

Gregory-Widmer
Copy link
Contributor

Description: Handles long string conversion by overriding for some objects how they are converted to a String. I chose to create an utility function that use the instanceof operator to "override" manually how objects are converted to String.

Then, if the object provided is a Long, we use the Long.printUnsignedLong(long) method to convert it to a String.

Justification: Fixes #1119

@quanticc quanticc requested a review from darichey April 8, 2023 04:12
@quanticc quanticc added the enhancement Improvement over an existing feature label Apr 8, 2023
@quanticc quanticc added this to the 3.3.0 milestone Apr 8, 2023
Copy link
Member

@Azn9 Azn9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just revert this format change

rest/src/main/java/discord4j/rest/util/RouteUtils.java Outdated Show resolved Hide resolved
@Azn9 Azn9 changed the base branch from master to 3.2.x April 2, 2024 01:21
@Azn9 Azn9 modified the milestones: 3.3.0, 3.2.7 Apr 2, 2024
@Azn9 Azn9 merged commit c617a87 into Discord4J:3.2.x Apr 2, 2024
5 checks passed
Azn9 added a commit to Azn9/Discord4J that referenced this pull request Apr 2, 2024
* fix(long): fix unsigned long printing in requests (Discord4J#1119)

* fix: revert format change

---------

Co-authored-by: Axel Joly <azn9.pro@gmail.com>
Azn9 added a commit to Azn9/Discord4J that referenced this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement over an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unsigned Long handling in GatewayDiscordClient#getMessageById
3 participants