goxr3plus / java-stream-player

🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )
GNU General Public License v3.0
145 stars 33 forks source link

AudioSystem.getMixerInfo() will not return null, so we don't have to … #56

Closed HelgeStenstrom closed 4 years ago

HelgeStenstrom commented 4 years ago

…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)

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

Has This Been Tested?

Checklist:

goxr3plus commented 4 years ago

Yes you are right :)

I checked the official documentation .

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

goxr3plus commented 4 years ago

Thank you :)