From b377ffcd462f21dc140a31daaebc57336c5b8d22 Mon Sep 17 00:00:00 2001 From: Finn Bock Date: Mon, 22 Nov 2004 07:57:34 +0000 Subject: [PATCH] Handle unknown subproperty names by logging an error message and ignoring the property value. PR: 32338 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198170 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/PropertyList.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/java/org/apache/fop/fo/PropertyList.java b/src/java/org/apache/fop/fo/PropertyList.java index c453b50ac..4703b1f0f 100644 --- a/src/java/org/apache/fop/fo/PropertyList.java +++ b/src/java/org/apache/fop/fo/PropertyList.java @@ -308,6 +308,10 @@ abstract public class PropertyList { Property baseProperty = findBaseProperty(attributes, parentFO, propId, basePropertyName, propertyMaker); int subpropId = FOPropertyMapping.getSubPropertyId(subPropertyName); + if (subpropId == -1) { + handleInvalidProperty(attributeName); + return; + } prop = propertyMaker.make(baseProperty, subpropId, this, attributeValue, parentFO); } @@ -353,8 +357,7 @@ abstract public class PropertyList { private void handleInvalidProperty(String attributeName) { if (!attributeName.startsWith("xmlns")) { - //log.error("property '" - // + attributeName + "' ignored"); + log.error("property '" + attributeName + "' ignored"); } } -- 2.39.5