jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r697125 - /jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/MultiStatusResponse.java
Date Fri, 19 Sep 2008 15:11:34 GMT
Author: reschke
Date: Fri Sep 19 08:11:34 2008
New Revision: 697125

URL: http://svn.apache.org/viewvc?rev=697125&view=rev
Log:
JCR-1744: suppress propstat elements when they have no properties to report

Modified:
    jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/MultiStatusResponse.java

Modified: jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/MultiStatusResponse.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/MultiStatusResponse.java?rev=697125&r1=697124&r2=697125&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/MultiStatusResponse.java
(original)
+++ jackrabbit/trunk/jackrabbit-webdav/src/main/java/org/apache/jackrabbit/webdav/MultiStatusResponse.java
Fri Sep 19 08:11:34 2008
@@ -252,11 +252,12 @@
                 Integer statusKey = (Integer) iter.next();
                 Status st = new Status(statusKey.intValue());
                 PropContainer propCont = (PropContainer) statusMap.get(statusKey);
-
-                Element propstat = DomUtil.createElement(document, XML_PROPSTAT, NAMESPACE);
-                propstat.appendChild(propCont.toXml(document));
-                propstat.appendChild(st.toXml(document));
-                response.appendChild(propstat);
+                if (!propCont.isEmpty()) {
+                    Element propstat = DomUtil.createElement(document, XML_PROPSTAT, NAMESPACE);
+                    propstat.appendChild(propCont.toXml(document));
+                    propstat.appendChild(st.toXml(document));
+                    response.appendChild(propstat);
+                }
             }
         } else {
             // add a single '<status>' element



Mime
View raw message