From e8e65a64f03dfe05ad245eb6a89184714c4d1286 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Fri, 2 Jun 2006 07:34:25 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/fo/PropertyList.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- 2.39.5