Instead of allowing to pass arbitrary out-of-bounds indexes to these bean classes, ensure that the index is always valid for the list. This is always true for our filter functions, except they all return `-1` if the list was empty. We have to check/assert that beforehand. This improves the logic somewhat, because fetching the stream always returns something now. Ideally, we wouldn’t be filtering stuff and then passing indices around everywhere, but that’s the current state of things. ~~~ I took the liberty to remove the `.of`-wrappers, because they don’t really add much compared to just calling the constructor here. |
||
---|---|---|
.. | ||
MainPlayerUi.java | ||
PlayerUi.java | ||
PlayerUiList.java | ||
PopupPlayerUi.java | ||
VideoPlayerUi.java |