You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/03/05 17:37:45 UTC

svn commit: r633919 - /lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/SiteTreeImpl.java

Author: andreas
Date: Wed Mar  5 08:37:37 2008
New Revision: 633919

URL: http://svn.apache.org/viewvc?rev=633919&view=rev
Log:
Removing dead code and now unnecessary last modification handling from SiteTreeImpl.

Modified:
    lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/SiteTreeImpl.java

Modified: lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/SiteTreeImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/SiteTreeImpl.java?rev=633919&r1=633918&r2=633919&view=diff
==============================================================================
--- lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/SiteTreeImpl.java (original)
+++ lenya/trunk/src/modules/sitetree/java/src/org/apache/lenya/cms/site/tree2/SiteTreeImpl.java Wed Mar  5 08:37:37 2008
@@ -80,7 +80,6 @@
         return this.sourceUri;
     }
 
-    private long lastModified = -1;
     private boolean loading = false;
 
     protected static final String NAMESPACE = "http://apache.org/cocoon/lenya/sitetree/1.0";
@@ -100,10 +99,7 @@
         try {
             repoNode.setPersistable(this);
             
-            // lastModified check is necessary for clustering, but can cause 404s
-            // because of the 1s file system last modification granularity
-            if (repoNode.exists() /* && repoNode.getLastModified() > this.lastModified */) {
-                long lastModified = repoNode.getLastModified();
+            if (repoNode.exists()) {
                 org.w3c.dom.Document xml = DocumentHelper.readDocument(repoNode.getInputStream());
 
                 NamespaceHelper helper = new NamespaceHelper(NAMESPACE, "", xml);
@@ -113,12 +109,10 @@
                 reset();
                 loadNodes(this.root, helper, xml.getDocumentElement());
                 this.loading = false;
-                this.lastModified = lastModified;
             }
 
-            if (!repoNode.exists() && this.lastModified > -1) {
+            if (!repoNode.exists()) {
                 reset();
-                this.lastModified = -1;
             }
 
             this.loaded = true;
@@ -181,7 +175,6 @@
 
             saveNodes(getRoot(), helper, helper.getDocument().getDocumentElement());
             helper.save(repoNode.getOutputStream());
-            this.lastModified = repoNode.getLastModified();
         } catch (RuntimeException e) {
             throw e;
         } catch (Exception e) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org