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

Replace isEmpty check with isBlank in StageInstanceActionImpl#setTopic #1698

Merged
merged 1 commit into from
Jul 1, 2021
Merged

Conversation

LenderSchlender
Copy link
Contributor

Pull Request Etiquette

Changes

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

Closes Issue: NaN

Description

When testing the latest JDA version (4.3.0_286), I noticed that when setting EmbedBuilder#ZERO_WIDTH_SPACE as the StageInstanceAction topic, I would only get an error when sending, not before.
This PR should fix this.

@arynxd
Copy link
Contributor

arynxd commented Jun 29, 2021

This PR should fix this.

have you tested it

@LenderSchlender
Copy link
Contributor Author

This PR should fix this.

have you tested it

I didn't test it at the time of creating this PR, but I tested it just now.
Apparently, Zero width space, and a few other invisible with no width characters don't count as whitespace (6 in total), so those still aren't checked, but it's still better than the old solution, which only checked if the String was empty.
There is probably still a better solution than this, but I don't know which one.
Maybe this should also be changed for ChannelActionImpl#setName()?

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

Successfully merging this pull request may close these issues.

None yet

4 participants