Some null checks
Checks for possible NPE's when importing channels/programs.
I suppose a big question is around the philosophy of this library. To what extent should it assume properties exist and what should it try to handle?
If the former, then we should add @nonnull to those properties. If the latter, then your PR would be useful.
I believe that both of the solutions proposed can be used for this PR. Here's my take on this:
- If the user can play a role in the property's creation, then
@NonNullcan be added. (getProgramsForChannel()case) - However, if the user can't really do anything since it is handled entirely by the library, then it should be fixed from within. (
setPosterArtUri()case)
Either solutions can be interchangeable but it depends on the level of control that the user have over the library. The open source variant can be changed easily to tailor the required needs. However, the packaged one could be a bit harder to play with.