goxr3plus / goxr3plus/java-stream-player
Question about Status enum and play()
- Dominant language
- Java
- Stars
- 158
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
What is the purpose of Status.OPENING? It seems to be written to status, but never read.
https://github.com/goxr3plus/java-stream-player/blob/7caf2f34fafd1504f25c9910750e841469f66a07/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L333-L335
There seem to be three values in Status that are never used; neither for write nor for read: INIT, BUFFERING and GAIN. I think they can be removed.
In the play() method, the status is tested. It returns silently if status != Status.OPENED. Is that a desirable feature?
https://github.com/goxr3plus/java-stream-player/blob/7caf2f34fafd1504f25c9910750e841469f66a07/src/main/java/com/goxr3plus/streamplayer/stream/StreamPlayer.java#L554-L572
That is why https://github.com/goxr3plus/java-stream-player/blob/7caf2f34fafd1504f25c9910750e841469f66a07/src/test/java/com/goxr3plus/streamplayer/stream/StreamPlayerFutureImprovementTest.java#L49-L54
fails. What is the best alternative: Changing the behaviour to make the test pass, or remove the test?
OK, there is a third alternative: to change the behaviour such that the error situation is indicated by some other means, and change the test correspondingly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.