From: Andreas L. Delmelle Date: Mon, 27 Feb 2006 17:51:45 +0000 (+0000) Subject: A nit: slight performance optimization X-Git-Tag: fop-0_92-beta~92 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3d819ae9d9601336504d6b2bf6018dfe62bb4080;p=xmlgraphics-fop.git A nit: slight performance optimization git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@381397 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 17ce3271a..7d4b0132d 100644 --- a/src/java/org/apache/fop/fo/PropertyList.java +++ b/src/java/org/apache/fop/fo/PropertyList.java @@ -293,15 +293,16 @@ public abstract class PropertyList { convertAttributeToProperty(attributes, attributeName, attributeValue); } - + + String attributeNS; for (int i = 0; i < attributes.getLength(); i++) { - /* convert all attributes with the same namespace as the fo element for this fObj */ - String attributeNS = attributes.getURI(i); - if (attributeNS.length() == 0 || attributeNS.equals(fobj.getNamespaceURI())) { - attributeName = attributes.getQName(i); - attributeValue = attributes.getValue(i); - convertAttributeToProperty(attributes, attributeName, attributeValue); - } + /* convert all attributes with the same namespace as the fo element for this fObj */ + attributeNS = attributes.getURI(i); + if (attributeNS.length() == 0 || attributeNS.equals(fobj.getNamespaceURI())) { + attributeName = attributes.getQName(i); + attributeValue = attributes.getValue(i); + convertAttributeToProperty(attributes, attributeName, attributeValue); + } } }