aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-05-28 12:56:24 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-05-28 12:56:24 +0000
commit34d7c97ca26d4b018226c03784cbaaba3dce24a9 (patch)
tree47c68ced11465ae0e32f8c565fb26f30c5e63343 /src/java
parent942c8245764c786f2eca11638d46d3264147c2f1 (diff)
downloadxmlgraphics-fop-34d7c97ca26d4b018226c03784cbaaba3dce24a9.tar.gz
xmlgraphics-fop-34d7c97ca26d4b018226c03784cbaaba3dce24a9.zip
Warning given when mimetype provided is missing/null for whatever reason
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@660931 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/render/afp/modca/Registry.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/afp/modca/Registry.java b/src/java/org/apache/fop/render/afp/modca/Registry.java
index c81b4a289..5287f1a2b 100644
--- a/src/java/org/apache/fop/render/afp/modca/Registry.java
+++ b/src/java/org/apache/fop/render/afp/modca/Registry.java
@@ -21,6 +21,8 @@ package org.apache.fop.render.afp.modca;
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 @@ import org.apache.xmlgraphics.util.MimeConstants;
* 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 @@ public final class Registry {
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;
}