jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r450896 - /jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PollMethod.java
Date Thu, 28 Sep 2006 15:27:10 GMT
Author: angela
Date: Thu Sep 28 08:27:09 2006
New Revision: 450896

URL: http://svn.apache.org/viewvc?view=rev&rev=450896
Log:
Poll returns eventdiscovery and not subscriptions.

Modified:
    jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PollMethod.java

Modified: jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PollMethod.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PollMethod.java?view=diff&rev=450896&r1=450895&r2=450896
==============================================================================
--- jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PollMethod.java
(original)
+++ jackrabbit/trunk/jcr-server/client/src/java/org/apache/jackrabbit/webdav/client/methods/PollMethod.java
Thu Sep 28 08:27:09 2006
@@ -103,12 +103,9 @@
       * @return
       */
      private boolean buildDiscoveryFromRoot(Element root) {
-         if (DomUtil.matches(root, XML_PROP, DavConstants.NAMESPACE) &&
-             DomUtil.hasChildElement(root, XML_EVENTDISCOVERY, ObservationConstants.NAMESPACE))
{
-             Element ld = DomUtil.getChildElement(root, XML_EVENTDISCOVERY, ObservationConstants.NAMESPACE);
+         if (DomUtil.matches(root, XML_EVENTDISCOVERY, ObservationConstants.NAMESPACE)) {
              eventDiscovery = new EventDiscovery();
-
-             ElementIterator it = DomUtil.getChildren(ld, XML_SUBSCRIPTION, ObservationConstants.NAMESPACE);
+             ElementIterator it = DomUtil.getChildren(root, XML_EVENTBUNDLE, ObservationConstants.NAMESPACE);
              while (it.hasNext()) {
                  final Element ebElement = it.nextElement();
                  EventBundle eb = new EventBundle() {
@@ -120,7 +117,7 @@
              }
              return true;
          } else {
-             log.debug("Missing DAV:prop response body in SUBSCRIBE method.");
+             log.debug("Missing 'eventdiscovery' response body in POLL method.");
          }
          return false;
      }



Mime
View raw message