From: <fg...@us...> - 2009-06-04 09:39:06
|
Revision: 1221 http://openutils.svn.sourceforge.net/openutils/?rev=1221&view=rev Author: fgiust Date: 2009-06-04 09:38:57 +0000 (Thu, 04 Jun 2009) Log Message: ----------- better logging of invalid image binaries (lenght=0) Modified Paths: -------------- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java Modified: trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java =================================================================== --- trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2009-05-26 10:32:35 UTC (rev 1220) +++ trunk/openutils-mgnlmedia/src/main/java/net/sourceforge/openutils/mgnlmedia/media/utils/ImageUtils.java 2009-06-04 09:38:57 UTC (rev 1221) @@ -548,6 +548,15 @@ throw new RuntimeException(e); } NodeData image = node.getNodeData("image"); + + if (image.getContentLength() == 0) + { + log.error( + "Invalid image nodedata " + image.getHandle() + ", size " + image.getContentLength(), + new Exception()); + return; + } + String extension = image.getAttribute(FileProperties.PROPERTY_EXTENSION); if (!Arrays.asList(extensions).contains(extension)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |