Utilities for DoubleClick Ad Exchange, including OpenRTB mapping, DoubleClick cryptography, metadata and validation
198
stars
82
forks
source link
Checking if playback method is null before attempting to add it #62
Closed
marcelomalcher closed 9 years ago
The mapper is throwing a
NullPointerException
when dealing with bid requests for video opportunities.From Adx spec we have the following regarding Playback Method:
This field is optional and the default value is unknown.
Then, the static method
VideoPlaybackMethodMapper.toOpenRtb
returnsnull
for the default value (unknown) when mapping video requests.Well, the OpenRtb
Video.Builder.addPlaybackmethod
does not allownull
values:Therefore, it is necessary to add the check to prevent adding the playback method when the value is
null
.