You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2006/10/09 10:44:04 UTC
svn commit: r454310 -
/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java
Author: jeremias
Date: Mon Oct 9 01:44:04 2006
New Revision: 454310
URL: http://svn.apache.org/viewvc?view=rev&rev=454310
Log:
Avoid NullPointerException when there are no ImageWriters for a particular MIME type
Modified:
xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java
Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java?view=diff&rev=454310&r1=454309&r2=454310
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java (original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/writer/ImageWriterRegistry.java Mon Oct 9 01:44:04 2006
@@ -141,6 +141,9 @@
*/
public ImageWriter getWriterFor(String mime) {
List entries = (List)imageWriterMap.get(mime);
+ if (entries == null) {
+ return null;
+ }
Iterator iter = entries.iterator();
while (iter.hasNext()) {
ImageWriter writer = (ImageWriter)iter.next();
---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org