Skip to content

Conversation

HelgeStenstrom
Copy link
Collaborator

@HelgeStenstrom HelgeStenstrom commented Dec 19, 2019

…check for it.

Description

Null checks clutter the code, and should be removed when not needed. AudioSystem.getMixerInfo() will not return null, so we don't have to check if it returns null. AudioSystem.getMixerInfo() may return an empty array.

There are no dependencies for this change

What kind of change does this PR introduce? (check at least one)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [x ] Code style update
  • [ x] Refactor
  • Build-related changes
  • This change requires a documentation update
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • [ x] No

Has This Been Tested?

  • [x ] Yes
  • No

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@goxr3plus
Copy link
Owner

Yes you are right :)

I checked the official documentation .

https://docs.oracle.com/javase/8/docs/api/javax/sound/sampled/AudioSystem.html#getMixerInfo--

@goxr3plus goxr3plus merged commit 7f08cff into goxr3plus:master Dec 31, 2019
@goxr3plus
Copy link
Owner

Thank you :)

@HelgeStenstrom HelgeStenstrom deleted the removeNullChecks branch January 1, 2020 18:44
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

Successfully merging this pull request may close these issues.

2 participants