svn commit: r630038 - /lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySourceValidity.java

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Thu Feb 21 14:46:07 2008
New Revision: 630038

URL: http://svn.apache.org/viewvc?rev=630038&view=rev
Log:
Don't try to obtain last modification date of non-existing sources.

Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySourceValidity.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySourceValidity.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySourceValidity.java?rev=630038&r1=630037&r2=630038&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySourceValidity.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/cocoon/source/RepositorySourceValidity.java Thu Feb 21 14:46:07 2008
@@ -34,7 +34,7 @@
      */
     public RepositorySourceValidity(RepositorySource source) {
         this.sourceUri = source.getSourceURI();
-        this.lastModified = source.getLastModified();
+        this.lastModified = source.exists() ? source.getLastModified() : 0;
     }
 
     public int isValid() {
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.