You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2003/07/14 18:06:21 UTC
cvs commit: cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl WebDAVSource.java
cziegeler 2003/07/14 09:06:21
Modified: src/java/org/apache/cocoon/components/pipeline/impl
AbstractCachingProcessingPipeline.java
src/java/org/apache/cocoon/caching CachedResponse.java
src/blocks/webdav/java/org/apache/cocoon/components/source/impl
WebDAVSource.java
Log:
Cleaning up code
Revision Changes Path
1.8 +3 -3 cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
Index: AbstractCachingProcessingPipeline.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractCachingProcessingPipeline.java 11 Jul 2003 08:59:03 -0000 1.7
+++ AbstractCachingProcessingPipeline.java 14 Jul 2003 16:06:20 -0000 1.8
@@ -518,7 +518,7 @@
new Date(responseExpires.longValue()));
}
this.cachedResponse = response.getResponse();
- this.cachedLastModified = response.lastModified;
+ this.cachedLastModified = response.getLastModified();
return;
} else {
if (this.getLogger().isDebugEnabled()) {
@@ -602,7 +602,7 @@
}
// we are valid, ok that's it
this.cachedResponse = response.getResponse();
- this.cachedLastModified = response.lastModified;
+ this.cachedLastModified = response.getLastModified();
} else {
if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("validatePipeline: cached content is invalid for '" + environment.getURI() + "'.");
1.3 +13 -9 cocoon-2.1/src/java/org/apache/cocoon/caching/CachedResponse.java
Index: CachedResponse.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/caching/CachedResponse.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CachedResponse.java 3 May 2003 18:34:41 -0000 1.2
+++ CachedResponse.java 14 Jul 2003 16:06:21 -0000 1.3
@@ -68,10 +68,10 @@
public final class CachedResponse
implements Serializable {
- private SourceValidity[] validityObjects;
- private byte[] response;
- private Long expires;
- public final long lastModified;
+ private final SourceValidity[] validityObjects;
+ private final byte[] response;
+ private Long expires;
+ private final long lastModified;
/**
* Create a new entry for the cache.
@@ -82,10 +82,7 @@
*/
public CachedResponse(SourceValidity[] validityObjects,
byte[] response) {
- this.validityObjects = validityObjects;
- this.response = response;
- this.expires = null;
- this.lastModified = this.setLastModified(System.currentTimeMillis());
+ this(validityObjects, response, null);
}
/**
@@ -147,4 +144,11 @@
// Return the value rounded to the nearest second.
return lastModified - (lastModified % 1000);
}
+ /**
+ * @return the last modified time
+ */
+ public long getLastModified() {
+ return lastModified;
+ }
+
}
1.2 +1 -2 cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java
Index: WebDAVSource.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/webdav/java/org/apache/cocoon/components/source/impl/WebDAVSource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- WebDAVSource.java 11 Jul 2003 10:32:35 -0000 1.1
+++ WebDAVSource.java 14 Jul 2003 16:06:21 -0000 1.2
@@ -68,7 +68,6 @@
import org.apache.cocoon.components.source.RestrictableSource;
import org.apache.cocoon.components.source.helpers.SourceCredential;
import org.apache.cocoon.components.source.helpers.SourcePermission;
-import org.apache.cocoon.components.source.helpers.SourcePermission;
import org.apache.commons.httpclient.HttpException;
import org.apache.excalibur.source.ModifiableSource;
import org.apache.excalibur.source.Source;