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 Error related to Banned users with Expiration dates #3817

Merged
merged 5 commits into from
Apr 1, 2023
Merged

Fix Error related to Banned users with Expiration dates #3817

merged 5 commits into from
Apr 1, 2023

Conversation

DrZoddiak
Copy link
Contributor

@DrZoddiak DrZoddiak commented Jan 18, 2023

Fixes #3788

The issue above was actually 2 separate issues.
First: BAN_DATE_FORMAT#format required a Date instead of an Instant, causing the first error.

Second: StoredUserListMixin was actually causing the ClassCastException because the List it redirects is actually a list of GameProfiles and not of Strings, which it later uses to remove an entry from a map wherein the Key is a GameProfile

This actually causes a ClassCastException wherein it attempts to cast a String to a GameProfile
@ImMorpheus
Copy link
Contributor

@DrZoddiak Thank you for your contribution!

Changes look good but it would be best to create separate PRs since they are two different issues.

First: BAN_DATE_FORMAT#format required a Date instead of an Instant, causing the first error.

Note for reviewers: there's an overloaded method for Object but it does an instance check under the hood and throw an exception if the object is not a Date or an Number

@ImMorpheus ImMorpheus added type: bug Something isn't working version: 1.16 (u) API: 8 status: requested changes Changes were requested during a review (used if there has been no activity for a while) labels Jan 28, 2023
@ImMorpheus ImMorpheus merged commit 3821642 into SpongePowered:api-8 Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: requested changes Changes were requested during a review (used if there has been no activity for a while) type: bug Something isn't working version: 1.16 (u) API: 8
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error related to banned users when given an expiration date
2 participants