]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugzilla #39701:
authorJeremias Maerki <jeremias@apache.org>
Fri, 2 Jun 2006 07:34:25 +0000 (07:34 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 2 Jun 2006 07:34:25 +0000 (07:34 +0000)
Fix potential NullPointerException when buggy JAXP implementations return null instead of an empty String as namespace URI.
Submitted by: Stefan Ziel <stefan.ziel.at.claninfo.ch>

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@411080 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/PropertyList.java

index 5bf00346a9817813bdb501ad2c5c78d7f70b1409..1f148d5fcab380d74347d9db2791790ccb6256e3 100644 (file)
@@ -301,7 +301,7 @@ public abstract class PropertyList {
             attributeNS = attributes.getURI(i);
             attributeName = attributes.getQName(i);
             attributeValue = attributes.getValue(i);
-            if (attributeNS.length() == 0) {
+            if (attributeNS == null || attributeNS.length() == 0) {
                 convertAttributeToProperty(attributes, attributeName, attributeValue);
             } else if (!factory.isNamespaceIgnored(attributeNS)) {
                 if (factory.getElementMappingRegistry().isKnownNamespace(attributeNS)) {