jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r397937 - /jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/NamespacesProperty.java
Date Fri, 28 Apr 2006 15:56:26 GMT
Author: angela
Date: Fri Apr 28 08:56:25 2006
New Revision: 397937

URL: http://svn.apache.org/viewcvs?rev=397937&view=rev
Log:
NamespacesProperty:
missing assertion for non-null prefix/uri

Modified:
    jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/NamespacesProperty.java

Modified: jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/NamespacesProperty.java
URL: http://svn.apache.org/viewcvs/jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/NamespacesProperty.java?rev=397937&r1=397936&r2=397937&view=diff
==============================================================================
--- jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/NamespacesProperty.java
(original)
+++ jackrabbit/trunk/jcr-server/server/src/java/org/apache/jackrabbit/webdav/jcr/property/NamespacesProperty.java
Fri Apr 28 08:56:25 2006
@@ -21,6 +21,7 @@
 import org.apache.jackrabbit.webdav.property.AbstractDavProperty;
 import org.apache.jackrabbit.webdav.property.DavProperty;
 import org.apache.jackrabbit.webdav.xml.DomUtil;
+import org.apache.jackrabbit.webdav.xml.Namespace;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.w3c.dom.Document;
@@ -72,8 +73,10 @@
             if (listEntry instanceof Element) {
                 Element e = (Element)listEntry;
                 if (XML_NAMESPACE.equals(e.getLocalName())) {
-                    String prefix = DomUtil.getChildText(e, XML_PREFIX, ItemResourceConstants.NAMESPACE);
-                    String uri = DomUtil.getChildText(e, XML_URI, ItemResourceConstants.NAMESPACE);
+                    Element pElem = DomUtil.getChildElement(e, XML_PREFIX, ItemResourceConstants.NAMESPACE);
+                    String prefix = DomUtil.getText(pElem, Namespace.EMPTY_NAMESPACE.getPrefix());
+                    Element uElem = DomUtil.getChildElement(e, XML_URI, ItemResourceConstants.NAMESPACE);
+                    String uri = DomUtil.getText(uElem, Namespace.EMPTY_NAMESPACE.getURI());
                     value.setProperty(prefix, uri);
                 }
             }



Mime
View raw message