We're updating the issue view to help you get more done. 

NumberFormatException if width="" on media:thumbnail

Description

Code to reproduce:

1 2 <media:thumbnail url="http://someurl/someimage.jpg" height="" width=""/>

This throws NFE. Code to fix it, line 373 in MediaModuleParser. Just add checks for string length. Could also add check for if it is an Integer?:

1 2 3 4 5 6 7 Time t = (thumb.getAttributeValue("time") == null || thumb.getAttributeValue("time").length() <= 0) ? null : new Time(thumb.getAttributeValue( "time")); Integer width = (thumb.getAttributeValue("width") == null || thumb.getAttributeValue("width").length() <= 0) ? null : new Integer(thumb.getAttributeValue("width")); Integer height = (thumb.getAttributeValue("height") == null || thumb.getAttributeValue("height").length() <= 0) ? null : new Integer(thumb.getAttributeValue("height"));

Environment

Java

Status

Assignee

Robert Cooper

Reporter

Anders Magnus Andersen

Priority

Major