-
Notifications
You must be signed in to change notification settings - Fork 243
Some null checks #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Some null checks #20
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -344,7 +344,7 @@ private static Program parseProgram(XmlPullParser parser) | |
| .setChannelId(channelId.hashCode()) | ||
| .setTitle(title) | ||
| .setDescription(description) | ||
| .setPosterArtUri(icon.src) | ||
| .setPosterArtUri(icon != null ? icon.src : null) | ||
|
||
| .setCanonicalGenres(category.toArray(new String[category.size()])) | ||
| .setStartTimeUtcMillis(startTimeUtcMillis) | ||
| .setEndTimeUtcMillis(endTimeUtcMillis) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will there be cases when the program list will be null while using the library?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my case, the provider doesn't have all programs for a given channel in the EPG's XMLTV. Surely enough, I could simply pass an empty list instead of returning null on when
getProgramsForChannel()is called.