You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by vg...@apache.org on 2007/10/18 05:35:42 UTC
svn commit: r585826 - in /cocoon/trunk/core/cocoon-pipeline:
cocoon-pipeline-components/src/main/java/org/apache/cocoon/generation/
cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/
Author: vgritsenko
Date: Wed Oct 17 20:35:41 2007
New Revision: 585826
URL: http://svn.apache.org/viewvc?rev=585826&view=rev
Log:
convert pipelines
Modified:
cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java
cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java?rev=585826&r1=585825&r2=585826&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-components/src/main/java/org/apache/cocoon/generation/DirectoryGenerator.java Wed Oct 17 20:35:41 2007
@@ -233,7 +233,7 @@
StringBuffer buffer = new StringBuffer();
int len = this.cacheKeyParList.size();
for (int i = 0; i < len; i++) {
- buffer.append((String)this.cacheKeyParList.get(i) + ":");
+ buffer.append(this.cacheKeyParList.get(i)).append(":");
}
return buffer.toString();
}
@@ -470,7 +470,7 @@
* false otherwise.
*/
protected boolean isRoot(File path) {
- return (this.rootRE == null) ? true : this.rootRE.match(path.getName());
+ return this.rootRE == null || this.rootRE.match(path.getName());
}
/**
@@ -481,7 +481,7 @@
* false otherwise.
*/
protected boolean isIncluded(File path) {
- return (this.includeRE == null) ? true : this.includeRE.match(path.getName());
+ return this.includeRE == null || this.includeRE.match(path.getName());
}
/**
@@ -492,14 +492,14 @@
* true otherwise.
*/
protected boolean isExcluded(File path) {
- return (this.excludeRE == null) ? false : this.excludeRE.match(path.getName());
+ return this.excludeRE != null && this.excludeRE.match(path.getName());
}
/**
* Recycle resources
*/
public void recycle() {
- if ( this.resolver != null ) {
+ if (this.resolver != null) {
this.resolver.release(this.directorySource);
this.directorySource = null;
}
Modified: cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java?rev=585826&r1=585825&r2=585826&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java (original)
+++ cocoon/trunk/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java Wed Oct 17 20:35:41 2007
@@ -25,13 +25,14 @@
import java.util.StringTokenizer;
import org.apache.avalon.excalibur.pool.Recyclable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.parameters.ParameterException;
import org.apache.avalon.framework.parameters.Parameterizable;
import org.apache.avalon.framework.parameters.Parameters;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
+import org.apache.excalibur.source.SourceValidity;
+
import org.apache.cocoon.ConnectionResetException;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.Environment;
@@ -45,12 +46,13 @@
import org.apache.cocoon.sitemap.SitemapErrorHandler;
import org.apache.cocoon.sitemap.SitemapModelComponent;
import org.apache.cocoon.transformation.Transformer;
+import org.apache.cocoon.util.AbstractLogEnabled;
import org.apache.cocoon.util.location.Locatable;
import org.apache.cocoon.util.location.Location;
import org.apache.cocoon.xml.SaxBuffer;
import org.apache.cocoon.xml.XMLConsumer;
import org.apache.cocoon.xml.XMLProducer;
-import org.apache.excalibur.source.SourceValidity;
+
import org.xml.sax.SAXException;
/**
@@ -61,9 +63,9 @@
* @since 2.1
* @version $Id$
*/
-public abstract class AbstractProcessingPipeline
- extends AbstractLogEnabled
- implements ProcessingPipeline, Parameterizable, Recyclable, Serviceable {
+public abstract class AbstractProcessingPipeline extends AbstractLogEnabled
+ implements ProcessingPipeline, Parameterizable,
+ Recyclable, Serviceable {
// Generator stuff
protected Generator generator;
@@ -817,8 +819,8 @@
return -1;
}
- long number = 0;
- long modifier = 0;
+ long number;
+ long modifier;
long expires = 0;
while (tokens.hasMoreTokens()) {