xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acumis...@apache.org
Subject svn commit: r660931 - /xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java
Date Wed, 28 May 2008 12:56:24 GMT
Author: acumiskey
Date: Wed May 28 05:56:24 2008
New Revision: 660931

URL: http://svn.apache.org/viewvc?rev=660931&view=rev
Log:
Warning given when mimetype provided is missing/null for whatever reason

Modified:
    xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java?rev=660931&r1=660930&r2=660931&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java
(original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/modca/Registry.java
Wed May 28 05:56:24 2008
@@ -21,6 +21,8 @@
 
 import java.util.Collections;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.fop.render.afp.DataObjectInfo;
 import org.apache.fop.render.afp.ImageObjectInfo;
 import org.apache.xmlgraphics.util.MimeConstants;
@@ -29,6 +31,8 @@
  * MOD:CA Registry of object types 
  */
 public final class Registry {
+    /** logging instance */
+    private static final Log log = LogFactory.getLog("org.apache.fop.afp");
 
     /** IOB supported object types */    
     private static final byte COMPID_GIF = 22;
@@ -131,7 +135,11 @@
         if (dataObjectInfo instanceof ImageObjectInfo) {
             ImageObjectInfo imageInfo = (ImageObjectInfo)dataObjectInfo;
             String mimeType = imageInfo.getMimeType();
-            entry = (Registry.ObjectType)mimeEntryMap.get(mimeType);
+            if (mimeType != null) {
+                entry = (Registry.ObjectType)mimeEntryMap.get(mimeType);
+            } else {
+                log.info("mimetype for " + dataObjectInfo + " is null");
+            }
         }
         return entry;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message