NullPointerException creating Video with null customFields
Brought to you by:
three4clavin
Not all videos on Brightcove have custom fields set on them, but I still needed to query for the field present. I found when I did so I got a NullPointerException in the Video(json) constructor. I fixed the issue with a simple if statement:
on Video.java, line 446, I added:
if(customKeys != null)
{
...
}
around the for loop for iterating through customKeys. In my case, customKeys was frequently null which caused the NPE.