You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by un...@apache.org on 2004/11/17 14:47:21 UTC
svn commit: rev 76130 - cocoon/trunk/src/java/org/apache/cocoon/components/pipeline/impl
Author: unico
Date: Wed Nov 17 05:47:20 2004
New Revision: 76130
Modified:
cocoon/trunk/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
Log:
return NOPValidity for event pipeline when it has not yet expired
Modified: cocoon/trunk/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java (original)
+++ cocoon/trunk/src/java/org/apache/cocoon/components/pipeline/impl/AbstractCachingProcessingPipeline.java Wed Nov 17 05:47:20 2004
@@ -31,6 +31,7 @@
import org.apache.excalibur.source.SourceValidity;
import org.apache.excalibur.source.impl.validity.AggregatedValidity;
import org.apache.excalibur.source.impl.validity.DeferredValidity;
+import org.apache.excalibur.source.impl.validity.NOPValidity;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
@@ -781,13 +782,20 @@
* Otherwise return <code>null</code>
*/
public SourceValidity getValidityForEventPipeline() {
- if (this.cachedResponse != null && this.toCacheSourceValidities != null) {
- final AggregatedValidity validity = new AggregatedValidity();
- for (int i=0; i < this.toCacheSourceValidities.length; i++) {
- validity.add(this.toCacheSourceValidities[i]);
+ if (this.cachedResponse != null) {
+ if (this.toCacheSourceValidities != null) {
+ // This means the pipeline is valid based on the validities
+ // of the individual components
+ final AggregatedValidity validity = new AggregatedValidity();
+ for (int i=0; i < this.toCacheSourceValidities.length; i++) {
+ validity.add(this.toCacheSourceValidities[i]);
+ }
+ return validity;
+ }
+ else {
+ // This means that the pipeline is valid because it has not yet expired
+ return NOPValidity.SHARED_INSTANCE;
}
- return validity;
-
} else {
int vals = 0;