tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r820166 - /tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java
Date Wed, 30 Sep 2009 03:49:07 GMT
Author: rfeng
Date: Wed Sep 30 03:49:07 2009
New Revision: 820166

URL: http://svn.apache.org/viewvc?rev=820166&view=rev
Log:
Only save the composite into DOM if there is a policySet with attachTo

Modified:
    tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java

Modified: tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java?rev=820166&r1=820165&r2=820166&view=diff
==============================================================================
--- tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java
(original)
+++ tuscany/java/sca/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/PolicyAttachmentBuilderImpl.java
Wed Sep 30 03:49:07 2009
@@ -118,7 +118,7 @@
                 }
             }
         }
-        Document document = saveAsDOM(composite);
+        Document document = null;
 
         for (PolicySet ps : definitions.getPolicySets()) {
             // First calculate the applicable nodes
@@ -135,6 +135,9 @@
             */
             XPathExpression exp = ps.getAttachToXPathExpression();
             if (exp != null) {
+                if (document == null) {
+                    document = saveAsDOM(composite);
+                }
                 NodeList nodes = (NodeList)exp.evaluate(document, XPathConstants.NODESET);
                 for (int i = 0; i < nodes.getLength(); i++) {
                     Node node = nodes.item(i);



Mime
View raw message