]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Handle unknown subproperty names by logging an error message and ignoring
authorFinn Bock <bckfnn@apache.org>
Mon, 22 Nov 2004 07:57:34 +0000 (07:57 +0000)
committerFinn Bock <bckfnn@apache.org>
Mon, 22 Nov 2004 07:57:34 +0000 (07:57 +0000)
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

index c453b50acba7ed1c29b0d4e47940330b74bfbb0e..4703b1f0fed39dc23d48e1a45b592714319e5798 100644 (file)
@@ -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");
         }
     }