jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r448237 - /jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java
Date Wed, 20 Sep 2006 15:36:04 GMT
Author: angela
Date: Wed Sep 20 08:36:03 2006
New Revision: 448237

URL: http://svn.apache.org/viewvc?view=rev&rev=448237
Log:
Building UpdateInfo from XML does not match description nor other constructions. multiple
DAV:href elements may be present with the version elem., but never multiple version elements.

Modified:
    jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java

Modified: jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java?view=diff&rev=448237&r1=448236&r2=448237
==============================================================================
--- jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java
(original)
+++ jackrabbit/trunk/jcr-server/webdav/src/java/org/apache/jackrabbit/webdav/version/UpdateInfo.java
Wed Sep 20 08:36:03 2006
@@ -99,11 +99,13 @@
         }
 
         boolean done = false;
-        ElementIterator it = DomUtil.getChildren(updateElement, XML_VERSION, NAMESPACE);
-        while (it.hasNext()) {
+        if (DomUtil.hasChildElement(updateElement, XML_VERSION, NAMESPACE)) {
+            Element vEl = DomUtil.getChildElement(updateElement, XML_VERSION, NAMESPACE);
+            ElementIterator hrefs = DomUtil.getChildren(vEl, DavConstants.XML_HREF, DavConstants.NAMESPACE);
             List hrefList = new ArrayList();
-            Element el = it.nextElement();
-            hrefList.add(DomUtil.getChildText(el, DavConstants.XML_HREF, DavConstants.NAMESPACE));
+            while (hrefs.hasNext()) {
+                hrefList.add(DomUtil.getText(hrefs.nextElement()));
+            }
             source = (String[])hrefList.toArray(new String[hrefList.size()]);
             done = true;
         }



Mime
View raw message