svn commit: r730700 - /lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Fri Jan  2 03:15:00 2009
New Revision: 730700

URL: http://svn.apache.org/viewvc?rev=730700&view=rev
Log:
Load collection if content length is larger than 1 instead of when document exists (might be empty nevertheless).

Modified:
    lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java

Modified: lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java?rev=730700&r1=730699&r2=730700&view=diff
==============================================================================
--- lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java (original)
+++ lenya/trunk/src/modules/collection/java/src/org/apache/lenya/modules/collection/CollectionWrapper.java Fri Jan  2 03:15:00 2009
@@ -264,7 +264,7 @@
 
         NamespaceHelper helper;
 
-        if (getDelegate().exists()) {
+        if (getDelegate().getContentLength() > 0) {
             org.w3c.dom.Document document = DocumentHelper.readDocument(getDelegate()
                     .getInputStream());
             helper = new NamespaceHelper(Collection.NAMESPACE, Collection.DEFAULT_PREFIX, document);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.