From: Jeremias Maerki Date: Fri, 2 Jun 2006 07:34:25 +0000 (+0000) Subject: Bugzilla #39701: X-Git-Tag: fop-0_93~203 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e8e65a64f03dfe05ad245eb6a89184714c4d1286;p=xmlgraphics-fop.git Bugzilla #39701: Fix potential NullPointerException when buggy JAXP implementations return null instead of an empty String as namespace URI. Submitted by: Stefan Ziel git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@411080 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/PropertyList.java b/src/java/org/apache/fop/fo/PropertyList.java index 5bf00346a..1f148d5fc 100644 --- a/src/java/org/apache/fop/fo/PropertyList.java +++ b/src/java/org/apache/fop/fo/PropertyList.java @@ -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)) {