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

Return immutable lists when documented #2607

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

freya022
Copy link
Contributor

Pull Request Etiquette

Changes

  • Internal code
  • Library interface (affecting end-user code)
  • Documentation
  • Other: _____

Closes Issue: NaN

Description

Prevents users from mutating returned lists, as they may think it does something

  • Return unmodifiable lists where documented
  • Replace Collections.unmodifiableList with the Helpers.toUnmodifiableCollection collector
  • Return unmodifiable lists in StringSelectInteraction#getSelectedOptions (previously undocumented) and Guild#getBoosters

@MinnDevelopment MinnDevelopment merged commit 8d3480a into discord-jda:master Jan 21, 2024
1 check passed
@freya022 freya022 deleted the fix/immutable-components branch January 21, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants