You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2006/06/27 20:17:12 UTC

svn commit: r417543 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ElementMappingRegistry.java

Author: jeremias
Date: Tue Jun 27 11:17:11 2006
New Revision: 417543

URL: http://svn.apache.org/viewvc?rev=417543&view=rev
Log:
Fix NPE if there's no ElementMapping for a particular namespace.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ElementMappingRegistry.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ElementMappingRegistry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ElementMappingRegistry.java?rev=417543&r1=417542&r2=417543&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ElementMappingRegistry.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/ElementMappingRegistry.java Tue Jun 27 11:17:11 2006
@@ -160,7 +160,11 @@
      */
     public DOMImplementation getDOMImplementationForNamespace(String namespaceURI) {
         ElementMapping mapping = (ElementMapping)this.namespaces.get(namespaceURI);
-        return mapping.getDOMImplementation();
+        if (mapping == null) {
+            return null;
+        } else {
+            return mapping.getDOMImplementation();
+        }
     }
     
     /**



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