vgritsenko 02/01/21 16:17:13
Modified: src/java/org/apache/cocoon Cocoon.java Main.java
src/java/org/apache/cocoon/acting DatabaseAddAction.java
DatabaseDeleteAction.java DatabaseUpdateAction.java
OraAddAction.java ScriptAction.java
src/java/org/apache/cocoon/caching CachedEventObject.java
CachedStreamObject.java
src/java/org/apache/cocoon/components
CocoonComponentManager.java
src/java/org/apache/cocoon/components/language/generator
ProgramGeneratorImpl.java
src/java/org/apache/cocoon/components/language/markup/xsp
XSPCookieHelper.java
src/java/org/apache/cocoon/components/language/markup/xsp/java
log.xsl
src/java/org/apache/cocoon/components/pipeline
AbstractStreamPipeline.java
CachingEventPipeline.java
CachingStreamPipeline.java
src/java/org/apache/cocoon/components/resolver
ResolverImpl.java
src/java/org/apache/cocoon/components/sax
XMLByteStreamInterpreter.java
src/java/org/apache/cocoon/components/source
SourceHandlerImpl.java URLSource.java
src/java/org/apache/cocoon/components/store
FilesystemQueueImpl.java FilesystemStore.java
MRUMemoryStore.java StoreJanitorImpl.java
src/java/org/apache/cocoon/components/url
URLFactoryImpl.java
src/java/org/apache/cocoon/components/xscript
XScriptManagerImpl.java
src/java/org/apache/cocoon/components/xslt
XSLTProcessorImpl.java
src/java/org/apache/cocoon/environment
AbstractEnvironment.java
src/java/org/apache/cocoon/environment/commandline
AbstractCommandLineEnvironment.java
CommandLineSession.java
LinkSamplingEnvironment.java
src/java/org/apache/cocoon/environment/http HttpContext.java
src/java/org/apache/cocoon/environment/wrapper
EnvironmentWrapper.java RequestParameters.java
RequestWrapper.java
src/java/org/apache/cocoon/i18n XMLResourceBundle.java
src/java/org/apache/cocoon/reading DatabaseReader.java
src/java/org/apache/cocoon/servlet CocoonServlet.java
ParanoidCocoonServlet.java
src/java/org/apache/cocoon/sitemap ContentAggregator.java
SitemapComponentSelector.java SitemapManager.java
src/java/org/apache/cocoon/transformation
TraxTransformer.java
src/java/org/apache/cocoon/util/log
XMLCocoonLogFormatter.java
Log:
Code style (don't use == true)
Revision Changes Path
1.5 +3 -3 xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java
Index: Cocoon.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Cocoon.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Cocoon.java 18 Jan 2002 20:13:40 -0000 1.4
+++ Cocoon.java 22 Jan 2002 00:17:11 -0000 1.5
@@ -103,7 +103,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Pierpaolo Fumagalli</a> (Apache
Software Foundation, Exoffice Technologies)
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Leo Sutic</a>
- * @version CVS $Revision: 1.4 $ $Date: 2002/01/18 20:13:40 $
+ * @version CVS $Revision: 1.5 $ $Date: 2002/01/22 00:17:11 $
*/
public class Cocoon
extends AbstractLoggable
@@ -366,12 +366,12 @@
if (getLogger().isDebugEnabled()) {
getLogger().debug("Configuration version: " +
conf.getAttribute("version"));
}
- if (Constants.CONF_VERSION.equals(conf.getAttribute("version")) == false) {
+ if (!Constants.CONF_VERSION.equals(conf.getAttribute("version"))) {
throw new ConfigurationException("Invalid configuration schema version.
Must be '" + Constants.CONF_VERSION + "'.");
}
String userRoles = conf.getAttribute("user-roles", "");
- if ("".equals(userRoles) == false) {
+ if (!"".equals(userRoles)) {
try {
p = (Parser)startupManager.lookup(Parser.ROLE);
SAXConfigurationHandler b = new SAXConfigurationHandler();
1.12 +6 -6 xml-cocoon2/src/java/org/apache/cocoon/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/Main.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Main.java 12 Jan 2002 02:00:10 -0000 1.11
+++ Main.java 22 Jan 2002 00:17:11 -0000 1.12
@@ -99,7 +99,7 @@
* Command line entry point.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.11 $ $Date: 2002/01/12 02:00:10 $
+ * @version CVS $Revision: 1.12 $ $Date: 2002/01/22 00:17:11 $
*/
public class Main {
@@ -340,7 +340,7 @@
System.exit(1);
}
- if (targets.size() == 0 && xspOnly == false) {
+ if (targets.size() == 0 && !xspOnly) {
String error = "Please, specify at least one starting URI.";
log.error(error);
System.out.println(error);
@@ -569,9 +569,9 @@
ArrayList links = new java.util.ArrayList();
Iterator i = uris.iterator();
String next;
- while (i.hasNext() == true) {
+ while (i.hasNext()) {
next = (String)i.next();
- if (links.contains(next) == false) {
+ if (!links.contains(next)) {
links.add(next);
}
}
@@ -584,9 +584,9 @@
this.processXSP(url);
} else if (this.followLinks) {
i = this.processURI(url).iterator();
- while (i.hasNext() == true) {
+ while (i.hasNext()) {
next = (String)i.next();
- if (links.contains(next) == false) {
+ if (!links.contains(next)) {
links.add(next);
}
}
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/acting/DatabaseAddAction.java
Index: DatabaseAddAction.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/DatabaseAddAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DatabaseAddAction.java 3 Jan 2002 12:31:07 -0000 1.1
+++ DatabaseAddAction.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -33,7 +33,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Donald Ball</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:07 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public class DatabaseAddAction extends AbstractDatabaseAction implements ThreadSafe
{
protected static final Map addStatements = new HashMap();
@@ -63,7 +63,7 @@
conn = datasource.getConnection();
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
- if (conn.getAutoCommit() == true) {
+ if (conn.getAutoCommit()) {
conn.setAutoCommit(false);
}
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/acting/DatabaseDeleteAction.java
Index: DatabaseDeleteAction.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/DatabaseDeleteAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DatabaseDeleteAction.java 3 Jan 2002 12:31:07 -0000 1.1
+++ DatabaseDeleteAction.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -32,7 +32,7 @@
* the keys.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:07 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public final class DatabaseDeleteAction extends AbstractDatabaseAction implements
ThreadSafe {
private static final Map deleteStatements = new HashMap();
@@ -62,7 +62,7 @@
conn = datasource.getConnection();
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
- if (conn.getAutoCommit() == true) {
+ if (conn.getAutoCommit()) {
conn.setAutoCommit(false);
}
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/acting/DatabaseUpdateAction.java
Index: DatabaseUpdateAction.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/DatabaseUpdateAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DatabaseUpdateAction.java 3 Jan 2002 12:31:07 -0000 1.1
+++ DatabaseUpdateAction.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -29,7 +29,7 @@
* only one table at a time to update.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:07 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public class DatabaseUpdateAction extends AbstractDatabaseAction implements
ThreadSafe {
private static final Map updateStatements = new HashMap();
@@ -59,7 +59,7 @@
conn = datasource.getConnection();
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
- if (conn.getAutoCommit() == true) {
+ if (conn.getAutoCommit()) {
conn.setAutoCommit(false);
}
1.2 +2 -2 xml-cocoon2/src/java/org/apache/cocoon/acting/OraAddAction.java
Index: OraAddAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/OraAddAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- OraAddAction.java 3 Jan 2002 12:31:07 -0000 1.1
+++ OraAddAction.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -35,7 +35,7 @@
* only one table at a time to update.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:07 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public class OraAddAction extends DatabaseAddAction {
private static final Map selectLOBStatements = new HashMap();
@@ -58,7 +58,7 @@
conn = datasource.getConnection();
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
- if (conn.getAutoCommit() == true) {
+ if (conn.getAutoCommit()) {
conn.setAutoCommit(false);
}
1.2 +2 -2 xml-cocoon2/src/java/org/apache/cocoon/acting/ScriptAction.java
Index: ScriptAction.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/acting/ScriptAction.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ScriptAction.java 3 Jan 2002 12:31:07 -0000 1.1
+++ ScriptAction.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -32,7 +32,7 @@
* A simple action that executes any script that can be run by the BSF
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jason Foster</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:07 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public class ScriptAction
@@ -59,7 +59,7 @@
src = resolver.resolve(scriptName);
String systemID = src.getSystemId();
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
getLogger().debug("script source [" + scriptName + "]");
getLogger().debug("script resolved to [" + systemID + "]");
}
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/caching/CachedEventObject.java
Index: CachedEventObject.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/caching/CachedEventObject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CachedEventObject.java 3 Jan 2002 12:31:08 -0000 1.1
+++ CachedEventObject.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -13,7 +13,7 @@
* This is an cached object as it is stored in the <code>EventCache</code>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:08 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public final class CachedEventObject implements java.io.Serializable {
@@ -39,7 +39,7 @@
public boolean isValid(ComponentCacheKey componentKey,
CacheValidity componentValidity) {
CacheValidity ownValidity =
(CacheValidity)this.validityObjects.get(componentKey);
- if (ownValidity != null && ownValidity.isValid(componentValidity) == true) {
+ if (ownValidity != null && ownValidity.isValid(componentValidity)) {
return true;
}
return false;
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/caching/CachedStreamObject.java
Index: CachedStreamObject.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/caching/CachedStreamObject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CachedStreamObject.java 3 Jan 2002 12:31:08 -0000 1.1
+++ CachedStreamObject.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -13,7 +13,7 @@
* This is an cached object as it is stored in the <code>StreamCache</code>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:08 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public final class CachedStreamObject implements java.io.Serializable {
@@ -39,7 +39,7 @@
public boolean isValid(ComponentCacheKey componentKey,
CacheValidity componentValidity) {
CacheValidity ownValidity =
(CacheValidity)this.validityObjects.get(componentKey);
- if (ownValidity != null && ownValidity.isValid(componentValidity) == true) {
+ if (ownValidity != null && ownValidity.isValid(componentValidity)) {
return true;
}
return false;
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java
Index: CocoonComponentManager.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/CocoonComponentManager.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CocoonComponentManager.java 7 Jan 2002 12:34:12 -0000 1.1
+++ CocoonComponentManager.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -28,7 +28,7 @@
* by a special lifecycle handling for a RequestLifecycleComponent.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/07 12:34:12 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public final class CocoonComponentManager
extends ExcaliburComponentManager
@@ -80,7 +80,7 @@
final Object[] objects = (Object[])stack.pop();
final Map components = (Map)objects[2];
final Iterator iter = components.values().iterator();
- while (iter.hasNext() == true) {
+ while (iter.hasNext()) {
final Object[] o = (Object[])iter.next();
final Component component = (Component)o[0];
((ComponentManager)o[1]).release( component );
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java
Index: ProgramGeneratorImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/generator/ProgramGeneratorImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ProgramGeneratorImpl.java 3 Jan 2002 12:31:09 -0000 1.1
+++ ProgramGeneratorImpl.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -39,7 +39,7 @@
/**
* The default implementation of <code>ProgramGenerator</code>
* @author <a href="mailto:[EMAIL PROTECTED]">Ricardo Rocha</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:09 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public class ProgramGeneratorImpl extends AbstractLoggable
implements ProgramGenerator, Contextualizable, Composable, Configurable,
ThreadSafe, Disposable {
@@ -201,7 +201,7 @@
);
}
- if (this.autoReload == false) {
+ if (!this.autoReload) {
return programInstance;
}
1.3 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java
Index: XSPCookieHelper.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/XSPCookieHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XSPCookieHelper.java 15 Jan 2002 16:43:20 -0000 1.2
+++ XSPCookieHelper.java 22 Jan 2002 00:17:11 -0000 1.3
@@ -43,7 +43,7 @@
* private static String returnCookieProperty(Map ,String ,int ,String );
* </pre>
*
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/15 16:43:20 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/01/22 00:17:11 $
*/
public class XSPCookieHelper extends XSPObjectHelper {
/**
@@ -533,7 +533,7 @@
if (cookies != null && cookies.length > 0) {
if (retrieveByName) {
count = 0;
- while (count < cookies.length && matchFound == false) {
+ while (count < cookies.length && !matchFound) {
currentCookie = cookies[count];
if (currentCookie.getName().equals(cookieName))
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/log.xsl
Index: log.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/log.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- log.xsl 3 Jan 2002 12:31:11 -0000 1.1
+++ log.xsl 22 Jan 2002 00:17:11 -0000 1.2
@@ -11,7 +11,7 @@
<!--
* @author <a href="mailto:[EMAIL PROTECTED]>Berin Loritsch</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:11 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
-->
<!-- XSP Response logicsheet for the Java language -->
@@ -68,7 +68,7 @@
String category = <xsl:value-of select="$name"/>;
org.apache.log.Logger logger =
org.apache.log.Hierarchy.getDefaultHierarchy().getLoggerFor("cocoon" +
(("".equals(category))? category : "." + category));
<!--
- if ("".equals(<xsl:value-of select="$filename"/>) == false) {
+ if (!"".equals(<xsl:value-of select="$filename"/>)) {
String file =
this.avalonContext.get(org.apache.cocoon.Constants.CONTEXT_LOG_DIR) + <xsl:value-of
select="$filename"/>;
org.apache.log.LogTarget[] targets = new org.apache.log.LogTarget[]
{
new org.apache.log.output.FileOutputLogTarget(file)
1.3 +4 -4
xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/AbstractStreamPipeline.java
Index: AbstractStreamPipeline.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/AbstractStreamPipeline.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractStreamPipeline.java 15 Jan 2002 11:10:51 -0000 1.2
+++ AbstractStreamPipeline.java 22 Jan 2002 00:17:11 -0000 1.3
@@ -30,7 +30,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/15 11:10:51 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/01/22 00:17:11 $
*/
public abstract class AbstractStreamPipeline extends AbstractLoggable implements
StreamPipeline, Disposable {
protected EventPipeline eventPipeline;
@@ -132,7 +132,7 @@
connectPipeline();
try {
- if (this.serializer.shouldSetContentLength() == true) {
+ if (this.serializer.shouldSetContentLength()) {
// set the output stream
ByteArrayOutputStream os = new ByteArrayOutputStream();
this.serializer.setOutputStream(os);
@@ -180,14 +180,14 @@
// has the read resource been modified?
long lastModified = this.reader.getLastModified();
if (lastModified != 0
- && environment.isResponseModified(lastModified) == false) {
+ && !environment.isResponseModified(lastModified)) {
// environment supports this, so we are finished
environment.setResponseIsNotModified();
return true;
}
- if (this.reader.shouldSetContentLength() == true) {
+ if (this.reader.shouldSetContentLength()) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
this.reader.setOutputStream(os);
this.reader.generate();
1.2 +12 -13
xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingEventPipeline.java
Index: CachingEventPipeline.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingEventPipeline.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CachingEventPipeline.java 3 Jan 2002 12:31:12 -0000 1.1
+++ CachingEventPipeline.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -41,7 +41,7 @@
* does not cache! (If it would cache, the response would be cached twice!)
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:12 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public class CachingEventPipeline
extends AbstractEventPipeline
@@ -97,7 +97,7 @@
public PipelineCacheKey generateKey(Environment environment)
throws Exception {
this.setup(environment);
- return (this.cacheable == true ? this.pipelineCacheKey : null);
+ return (this.cacheable ? this.pipelineCacheKey : null);
}
/**
@@ -112,7 +112,7 @@
*/
public Map generateValidity(Environment environment)
throws Exception {
- if (this.cacheable == true) {
+ if (this.cacheable) {
return this.validityObjects;
}
return null;
@@ -125,7 +125,7 @@
public void setStreamPipelineCaches(boolean flag) {
// if we are cacheable and this method is called
// reset the pipeline cache key to avoid duplicate caching
- if (flag == true) {
+ if (flag) {
this.pipelineCacheKey = null;
}
}
@@ -146,18 +146,17 @@
Iterator validityIterator = validityObjects.keySet().iterator();
ComponentCacheKey validityKey;
boolean valid = true;
- while (validityIterator.hasNext() == true && valid == true) {
+ while (validityIterator.hasNext() && valid) {
validityKey = (ComponentCacheKey)validityIterator.next();
valid = cachedObject.isValid(validityKey,
(CacheValidity)validityObjects.get(validityKey));
- if (getLogger().isDebugEnabled() == true) {
+ if (getLogger().isDebugEnabled()) {
CacheValidity cachedValidity =
cachedObject.getCacheValidity(validityKey);
getLogger().debug("Compared cached validity '" +
cachedValidity +
"' with new validity '" +
validityObjects.get(validityKey) +
- "' : " + (valid == true ? "valid" : "changed"));
+ "' : " + (valid ? "valid" : "changed"));
}
}
- if (valid == true) {
-
+ if (valid) {
getLogger().debug("Using valid cached content for '" +
environment.getURI() + "'.");
// get all transformers which are not cacheable
int transformerSize = this.transformers.size();
@@ -228,10 +227,10 @@
* Cacheable.
*/
private void setup(Environment environment) throws Exception {
- if (this.setupFinished == true) {
+ if (this.setupFinished) {
return;
}
- if (this.checkPipeline() == false) {
+ if (!this.checkPipeline()) {
throw new ProcessingException("Attempted to process incomplete
pipeline.");
}
@@ -266,7 +265,7 @@
boolean testTrans = true;
while (this.firstNotCacheableTransformerIndex < transformerSize
- && testTrans == true) {
+ && testTrans) {
trans =
(Transformer)this.transformers.get(this.firstNotCacheableTransformerIndex);
if (trans instanceof Cacheable) {
transKey = ((Cacheable)trans).generateKey();
@@ -284,7 +283,7 @@
} else {
testTrans = false;
}
- if (testTrans == true)
+ if (testTrans)
this.firstNotCacheableTransformerIndex++;
}
// all transformers are cacheable => pipeline is cacheable
1.2 +16 -19
xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingStreamPipeline.java
Index: CachingStreamPipeline.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/pipeline/CachingStreamPipeline.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CachingStreamPipeline.java 3 Jan 2002 12:31:12 -0000 1.1
+++ CachingStreamPipeline.java 22 Jan 2002 00:17:11 -0000 1.2
@@ -41,7 +41,7 @@
* </ul>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:12 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:11 $
*/
public class CachingStreamPipeline extends AbstractStreamPipeline {
@@ -104,7 +104,7 @@
// has the read resource been modified?
long lastModified = this.reader.getLastModified();
if (lastModified != 0
- && environment.isResponseModified(lastModified) == false) {
+ && !environment.isResponseModified(lastModified)) {
// environment supports this, so we are finished
environment.setResponseIsNotModified();
@@ -159,17 +159,17 @@
Iterator validityIterator = validityObjects.keySet().iterator();
ComponentCacheKey validityKey;
boolean valid = true;
- while (validityIterator.hasNext() == true && valid == true) {
+ while (validityIterator.hasNext() && valid) {
validityKey = (ComponentCacheKey)validityIterator.next();
valid = cachedObject.isValid(validityKey,
(CacheValidity)validityObjects.get(validityKey));
- if (getLogger().isDebugEnabled() == true) {
+ if (getLogger().isDebugEnabled()) {
CacheValidity cachedValidity =
cachedObject.getCacheValidity(validityKey);
getLogger().debug("Compared cached validity '" +
cachedValidity +
"' with new validity '" +
validityObjects.get(validityKey) +
- "' : " + (valid == true ? "valid" : "changed"));
+ "' : " + (valid ? "valid" : "changed"));
}
}
- if (valid == true) {
+ if (valid) {
getLogger().debug("Using valid cached content for '" +
environment.getURI() + "'.");
byte[] response = cachedObject.getResponse();
@@ -180,7 +180,7 @@
}
}
- if(usedCache == false) {
+ if(!usedCache) {
getLogger().debug("Cached content is invalid for '" +
environment.getURI() + "'.");
// remove invalid cached object
@@ -194,9 +194,9 @@
}
}
- if (usedCache == false) {
+ if (!usedCache) {
- if (this.reader.shouldSetContentLength() == true) {
+ if (this.reader.shouldSetContentLength()) {
ByteArrayOutputStream os = new ByteArrayOutputStream();
this.reader.setOutputStream(os);
this.reader.generate();
@@ -299,18 +299,17 @@
Iterator validityIterator =
validityObjects.keySet().iterator();
ComponentCacheKey validityKey;
boolean valid = true;
- while (validityIterator.hasNext() == true && valid ==
true) {
+ while (validityIterator.hasNext() && valid) {
validityKey =
(ComponentCacheKey)validityIterator.next();
valid = cachedObject.isValid(validityKey,
(CacheValidity)validityObjects.get(validityKey));
- if (getLogger().isDebugEnabled() == true) {
+ if (getLogger().isDebugEnabled()) {
CacheValidity cachedValidity =
cachedObject.getCacheValidity(validityKey);
getLogger().debug("Compared cached validity '"
+ cachedValidity +
"' with new validity '" +
validityObjects.get(validityKey) +
- "' : " + (valid == true ? "valid" :
"changed"));
+ "' : " + (valid ? "valid" : "changed"));
}
}
- if (valid == true) {
-
+ if (valid) {
getLogger().debug("Using valid cached content for
'" + environment.getURI() + "'.");
byte[] bytes = cachedObject.getResponse();
if(bytes.length > 0) {
@@ -320,8 +319,7 @@
}
}
- if (usedCache == false) {
-
+ if (!usedCache) {
getLogger().debug("Cached content is invalid for '"
+ environment.getURI() + "'.");
// remove invalid cached object
@@ -338,9 +336,8 @@
}
}
- if (usedCache == false) {
-
- if (this.serializer.shouldSetContentLength() == true) {
+ if (!usedCache) {
+ if (this.serializer.shouldSetContentLength()) {
// set the output stream
ByteArrayOutputStream os = new ByteArrayOutputStream();
this.serializer.setOutputStream(os);
1.4 +5 -5
xml-cocoon2/src/java/org/apache/cocoon/components/resolver/ResolverImpl.java
Index: ResolverImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/resolver/ResolverImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ResolverImpl.java 18 Jan 2002 03:17:23 -0000 1.3
+++ ResolverImpl.java 22 Jan 2002 00:17:12 -0000 1.4
@@ -44,7 +44,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Davanum Srinivas</a>
* @author <a href="mailto:[EMAIL PROTECTED]">David Crossley</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/01/18 03:17:23 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/01/22 00:17:12 $
*/
public class ResolverImpl extends AbstractLoggable
implements Resolver, Contextualizable, Composable, Parameterizable,
@@ -79,7 +79,7 @@
int debugLevel = Debug.getDebug();
String verbosity = params.getParameter("verbosity", "");
if (verbosity != "") {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Setting Catalog resolver "
+ "verbosity level to " + verbosity);
}
@@ -103,7 +103,7 @@
catalogURL =
this.context.getResource(catalogFile).toExternalForm();
}
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("System OASIS Catalog URL is "
+ catalogURL);
}
@@ -116,7 +116,7 @@
String localCatalogFile = params.getParameter("local-catalog", "");
if (localCatalogFile != "") {
try {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Additional Catalog is "
+ localCatalogFile);
}
@@ -176,7 +176,7 @@
InputSource altInputSource = catalogResolver.resolveEntity(publicId,
systemId);
if (altInputSource != null) {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Resolved catalog entity: "
+ publicId + " " + altInputSource.getSystemId());
}
1.3 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamInterpreter.java
Index: XMLByteStreamInterpreter.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamInterpreter.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLByteStreamInterpreter.java 18 Jan 2002 19:16:48 -0000 1.2
+++ XMLByteStreamInterpreter.java 22 Jan 2002 00:17:12 -0000 1.3
@@ -20,7 +20,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/18 19:16:48 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/01/22 00:17:12 $
*/
public final class XMLByteStreamInterpreter
@@ -50,7 +50,7 @@
public void deserialize(Object saxFragment)
throws SAXException {
- if (saxFragment instanceof byte[] == false) {
+ if (!(saxFragment instanceof byte[])) {
throw new SAXException("XMLDeserializer needs byte array for
deserialization.");
}
this.input = (byte[])saxFragment;
1.2 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/components/source/SourceHandlerImpl.java
Index: SourceHandlerImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/SourceHandlerImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SourceHandlerImpl.java 3 Jan 2002 12:31:14 -0000 1.1
+++ SourceHandlerImpl.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -36,7 +36,7 @@
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version $Id: SourceHandlerImpl.java,v 1.1 2002/01/03 12:31:14 giacomo Exp $
+ * @version $Id: SourceHandlerImpl.java,v 1.2 2002/01/22 00:17:12 vgritsenko Exp $
*/
public final class SourceHandlerImpl
extends AbstractLoggable
@@ -67,7 +67,7 @@
String protocol = null;
for (int i = 0; i < configs.length; i++) {
protocol = configs[i].getAttribute("name");
- if (factories.containsKey(protocol) == true) {
+ if (factories.containsKey(protocol)) {
throw new ConfigurationException("SourceFactory defined twice
for protocol: " + protocol);
}
@@ -114,7 +114,7 @@
}
Iterator iter = this.sourceFactories.values().iterator();
SourceFactory current;
- while (iter.hasNext() == true) {
+ while (iter.hasNext()) {
current = (SourceFactory) iter.next();
this.deinit(current);
}
1.2 +8 -8
xml-cocoon2/src/java/org/apache/cocoon/components/source/URLSource.java
Index: URLSource.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/source/URLSource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- URLSource.java 3 Jan 2002 12:31:14 -0000 1.1
+++ URLSource.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -32,7 +32,7 @@
* Description of a source which is described by an URL.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:14 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:12 $
*/
public class URLSource implements ModifiableSource {
@@ -81,8 +81,8 @@
* Any exceptions are ignored.
*/
private void getInfos() {
- if (this.gotInfos == false) {
- if (this.isFile == true) {
+ if (!this.gotInfos) {
+ if (this.isFile) {
File file = new File(systemId.substring(FILE.length()));
this.lastModificationDate = file.lastModified();
this.contentLength = file.length();
@@ -91,7 +91,7 @@
if (this.connection == null) {
this.connection = this.url.openConnection();
String userInfo = this.getUserInfo();
- if (this.url.getProtocol().startsWith("http") == true &&
userInfo != null) {
+ if (this.url.getProtocol().startsWith("http") && userInfo
!= null) {
this.connection.setRequestProperty("Authorization","Basic
"+this.encodeBASE64(userInfo));
}
}
@@ -136,14 +136,14 @@
this.getInfos();
try{
InputStream input = null;
- if (this.isFile == true) {
+ if (this.isFile) {
input = new FileInputStream(this.systemId.substring(FILE.length()));
} else {
if (this.connection == null) {
this.connection = this.url.openConnection();
/* The following requires a jdk 1.3 */
String userInfo = this.getUserInfo();
- if (this.url.getProtocol().startsWith("http") == true &&
userInfo != null) {
+ if (this.url.getProtocol().startsWith("http") && userInfo !=
null) {
this.connection.setRequestProperty("Authorization","Basic
"+encodeBASE64(userInfo));
}
}
@@ -168,8 +168,8 @@
* method which is introduced in jdk 1.3
*/
private String getUserInfo() {
- if (URLSource.checkedURLClass == true) {
- if (URLSource.urlSupportsGetUserInfo == true) {
+ if (URLSource.checkedURLClass) {
+ if (URLSource.urlSupportsGetUserInfo) {
try {
return (String) URLSource.urlGetUserInfo.invoke(this.url,
URLSource.emptyParams);
} catch (Exception e){
1.3 +10 -10
xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemQueueImpl.java
Index: FilesystemQueueImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemQueueImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FilesystemQueueImpl.java 7 Jan 2002 12:39:14 -0000 1.2
+++ FilesystemQueueImpl.java 22 Jan 2002 00:17:12 -0000 1.3
@@ -71,7 +71,7 @@
this.workdir = (File)context.get(Constants.CONTEXT_WORK_DIR);
this.cachedirstr = IOUtils.getContextFilePath(this.workdir.getPath(),
this.cachedir.getPath());
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Context path="
+
IOUtils.getContextFilePath(this.workdir.getPath(),this.cachedir.getPath()));
}
@@ -84,7 +84,7 @@
*/
public void compose(ComponentManager manager) throws ComponentException {
this.manager = manager;
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
getLogger().debug("Looking up " + Store.ROLE + "/Filesystem");
}
this.fsstore = (Store)manager.lookup(Store.ROLE + "/Filesystem");
@@ -113,7 +113,7 @@
this.handlerinterval = params.getParameterAsInteger("handlerinterval",10);
this.threadpriority = params.getParameterAsInteger("threadpriority",5);
this.maxobjects = params.getParameterAsInteger("maxobjects",100);
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Configure Filesystem Queue");
this.getLogger().debug("handlerinterval=" + handlerinterval);
this.getLogger().debug("threadpriority=" + threadpriority);
@@ -155,7 +155,7 @@
* Clear all elements from queue.
*/
public void clear() {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Clearing the FilesystemQueue");
}
ListIterator listIterator = linkedList.listIterator(0);
@@ -180,7 +180,7 @@
*/
public void insert(Object element) {
if(this.linkedList.size() < maxobjects) {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Insert Element in FilesystemQueue");
}
this.linkedList.addFirst(element);
@@ -194,10 +194,10 @@
* Return element on top of heap but don't remove it.
*
* @return the element at top of heap
- * @exception NoSuchElementException if isEmpty() == true
+ * @exception NoSuchElementException if queue is empty
*/
public Object peek() throws NoSuchElementException {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Peek Element in FilesystemQueue");
}
return (Comparable)linkedList.getLast();
@@ -207,10 +207,10 @@
* Return element on top of heap and remove it.
*
* @return the element at top of heap
- * @exception NoSuchElementException if isEmpty() == true
+ * @exception NoSuchElementException if queue is empty
*/
public Object pop() throws NoSuchElementException {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Pop Element in FilesystemQueue");
}
return (Comparable)linkedList.removeLast();
@@ -233,7 +233,7 @@
}
public void reportSize() {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Size of FilesystemQueue=" +
this.linkedList.size());
}
}
1.2 +4 -4
xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemStore.java
Index: FilesystemStore.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/FilesystemStore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- FilesystemStore.java 3 Jan 2002 12:31:14 -0000 1.1
+++ FilesystemStore.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -88,12 +88,12 @@
* Get the file associated with the given unique key name.
*/
public Object get(final Object key) {
- if (this.getLogger().isDebugEnabled() == true)
+ if (this.getLogger().isDebugEnabled())
getLogger().debug("FilesystemStore get(): Get file with key: " +
key.toString());
final File file = fileFromKey(key);
if (file != null && file.exists()) {
- if (this.getLogger().isDebugEnabled() == true)
+ if (this.getLogger().isDebugEnabled())
getLogger().debug("FilesystemStore get(): Found file with key: " +
key.toString());
return file;
}
@@ -180,7 +180,7 @@
final int subStringBegin = this.directoryFile.getAbsolutePath().length() +
1;
final File[] files = directory.listFiles();
for(int i=0; i<files.length; i++) {
- if (files[i].isDirectory() == true) {
+ if (files[i].isDirectory()) {
this.addKeys(enum, files[i]);
} else {
enum.add(files[i].getAbsolutePath().substring(subStringBegin));
@@ -214,7 +214,7 @@
}
public Object nextElement() {
- if (this.hasMoreElements() == true) {
+ if (this.hasMoreElements()) {
this.index++;
return this.array[index-1];
}
1.2 +5 -5
xml-cocoon2/src/java/org/apache/cocoon/components/store/MRUMemoryStore.java
Index: MRUMemoryStore.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/MRUMemoryStore.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- MRUMemoryStore.java 3 Jan 2002 12:31:14 -0000 1.1
+++ MRUMemoryStore.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -93,7 +93,7 @@
this.workdir = (File)context.get(Constants.CONTEXT_WORK_DIR);
this.cachedirstr = IOUtils.getContextFilePath(this.workdir.getPath(),
this.cachedir.getPath());
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("cachedir=" + this.cachedir);
this.getLogger().debug("workdir=" + this.workdir);
this.getLogger().debug("cachedirstr=" + this.cachedirstr);
@@ -338,7 +338,7 @@
this.length = 0;
this.index = 0;
- while (cache.hasMoreElements() == true) {
+ while (cache.hasMoreElements()) {
this.add(cache.nextElement().toString());
}
RE re = null;
@@ -349,9 +349,9 @@
ree.printStackTrace();
}
- while (fs.hasMoreElements() == true) {
+ while (fs.hasMoreElements()) {
final String key = fs.nextElement().toString();
- if (re.match(cachedir) == true) {
+ if (re.match(cachedir)) {
this.add(key);
}
}
@@ -372,7 +372,7 @@
}
public Object nextElement() {
- if (this.hasMoreElements() == true) {
+ if (this.hasMoreElements()) {
this.index++;
return this.array[index-1];
}
1.2 +14 -14
xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitorImpl.java
Index: StoreJanitorImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/store/StoreJanitorImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- StoreJanitorImpl.java 3 Jan 2002 12:31:14 -0000 1.1
+++ StoreJanitorImpl.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -56,7 +56,7 @@
* @exception ConfigurationException
*/
public void configure(Configuration conf) throws ConfigurationException {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Configure StoreJanitorImpl");
}
this.setJVM(Runtime.getRuntime());
@@ -86,7 +86,7 @@
public void start() {
doRun = true;
Thread checker = new Thread(this);
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Intializing checker thread");
}
checker.setPriority(this.getPriority());
@@ -106,13 +106,13 @@
while (doRun) {
// amount of memory used is greater then heapsize
if (this.memoryLow()) {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Invoking garbage collection, total
memory = "
+ this.getJVM().totalMemory() + ", free memory = "
+ this.getJVM().freeMemory());
}
this.freePhysicalMemory();
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Garbage collection complete, total
memory = "
+ this.getJVM().totalMemory() + ", free memory = "
+ this.getJVM().freeMemory());
@@ -136,7 +136,7 @@
* @return true if memory is low
*/
private boolean memoryLow() {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("getJVM().totalMemory()=" +
this.getJVM().totalMemory());
this.getLogger().debug("getHeapsize()=" + this.getHeapsize());
this.getLogger().debug("getJVM().freeMemory()=" +
this.getJVM().freeMemory());
@@ -152,7 +152,7 @@
*/
public void register(Store store) {
this.getStoreList().add(store);
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Registering store instance");
this.getLogger().debug("Size of StoreJanitor now:" +
this.getStoreList().size());
}
@@ -165,7 +165,7 @@
*/
public void unregister(Store store) {
this.getStoreList().remove(store);
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Unregister store instance");
this.getLogger().debug("Size of StoreJanitor now:" +
this.getStoreList().size());
}
@@ -192,27 +192,27 @@
*/
private void freeMemory() {
try {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("StoreJanitor freeing memory!");
this.getLogger().debug("StoreList size=" +
this.getStoreList().size());
this.getLogger().debug("Index before=" + this.getIndex());
}
if (this.getIndex() < this.getStoreList().size()) {
if(this.getIndex() == -1) {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Freeing at index=" +
this.getIndex());
}
((Store)this.getStoreList().get(0)).free();
this.setIndex(0);
} else {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Freeing at index=" +
this.getIndex());
}
((Store)this.getStoreList().get(this.getIndex())).free();
this.setIndex(this.getIndex() + 1);
}
} else {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Starting from the beginning");
}
this.resetIndex();
@@ -220,7 +220,7 @@
this.setIndex(0);
}
this.freePhysicalMemory();
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Index after=" + this.getIndex());
}
} catch(Exception e) {
@@ -285,7 +285,7 @@
}
private void setIndex(int _index) {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Setting index=" + _index);
}
this.index = _index;
@@ -296,7 +296,7 @@
}
private void resetIndex() {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Reseting index");
}
this.index = -1;
1.3 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/components/url/URLFactoryImpl.java
Index: URLFactoryImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/url/URLFactoryImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- URLFactoryImpl.java 14 Jan 2002 12:11:52 -0000 1.2
+++ URLFactoryImpl.java 22 Jan 2002 00:17:12 -0000 1.3
@@ -34,7 +34,7 @@
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version $Id: URLFactoryImpl.java,v 1.2 2002/01/14 12:11:52 cziegeler Exp $
+ * @version $Id: URLFactoryImpl.java,v 1.3 2002/01/22 00:17:12 vgritsenko Exp $
*/
public class URLFactoryImpl
extends AbstractLoggable
@@ -139,7 +139,7 @@
String protocol = null;
for (int i = 0; i < configs.length; i++) {
protocol = configs[i].getAttribute("name");
- if (factories.containsKey(protocol) == true) {
+ if (factories.containsKey(protocol)) {
throw new ConfigurationException("URLFactory defined twice for
protocol: " + protocol);
}
getLogger().debug("\tfor protocol: " + protocol + " " +
configs[i].getAttribute("class"));
@@ -169,7 +169,7 @@
public void dispose() {
Iterator iter = this.factories.values().iterator();
URLFactory current;
- while (iter.hasNext() == true) {
+ while (iter.hasNext()) {
current = (URLFactory) iter.next();
this.deinit(current);
}
1.2 +0 -1
xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptManagerImpl.java
Index: XScriptManagerImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xscript/XScriptManagerImpl.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XScriptManagerImpl.java 3 Jan 2002 12:31:15 -0000 1.1
+++ XScriptManagerImpl.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -26,7 +26,6 @@
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.cocoon.components.xslt.XSLTProcessor;
import org.apache.cocoon.components.xscript.XScriptObjectFromURL;
/**
1.4 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java
Index: XSLTProcessorImpl.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/xslt/XSLTProcessorImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XSLTProcessorImpl.java 14 Jan 2002 16:18:56 -0000 1.3
+++ XSLTProcessorImpl.java 22 Jan 2002 00:17:12 -0000 1.4
@@ -321,7 +321,7 @@
{
Templates templates = null;
- if (useStore == false)
+ if (!useStore)
return null;
getLogger().debug("XSLTProcessorImpl getTemplates: stylesheet " + id);
@@ -355,7 +355,7 @@
private void putTemplates (Templates templates, Source stylesheet, String id)
throws IOException, ProcessingException
{
- if (useStore == false)
+ if (!useStore)
return;
// only stylesheets with a last modification date are stored
1.4 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/environment/AbstractEnvironment.java
Index: AbstractEnvironment.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/AbstractEnvironment.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- AbstractEnvironment.java 15 Jan 2002 07:42:02 -0000 1.3
+++ AbstractEnvironment.java 22 Jan 2002 00:17:12 -0000 1.4
@@ -26,7 +26,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.3 $ $Date: 2002/01/15 07:42:02 $
+ * @version CVS $Revision: 1.4 $ $Date: 2002/01/22 00:17:12 $
*/
public abstract class AbstractEnvironment extends AbstractLoggable implements
Environment {
@@ -187,7 +187,7 @@
getLogger().debug("\tfrom context(" + this.context.toExternalForm() +
") and prefix(" + this.prefix + ")");
getLogger().debug("\tat URI " + this.uris);
}
- if (prefix.length() >= 1 && this.uris.startsWith(prefix) == false) {
+ if (prefix.length() >= 1 && !this.uris.startsWith(prefix)) {
if (getLogger().isErrorEnabled())
{
this.getLogger().error("The current URI ("
@@ -203,7 +203,7 @@
this.uris = this.uris.substring(prefix.length());
// check for a slash at the beginning to avoid problems with subsitemaps
- if (this.uris.startsWith("/") == true) {
+ if (this.uris.startsWith("/")) {
this.uris = this.uris.substring(1);
this.prefix.append('/');
}
1.2 +6 -6
xml-cocoon2/src/java/org/apache/cocoon/environment/commandline/AbstractCommandLineEnvironment.java
Index: AbstractCommandLineEnvironment.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/commandline/AbstractCommandLineEnvironment.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractCommandLineEnvironment.java 3 Jan 2002 12:31:16 -0000 1.1
+++ AbstractCommandLineEnvironment.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -27,7 +27,7 @@
* This environment is used to save the requested file to disk.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:12 $
*/
public abstract class AbstractCommandLineEnvironment
@@ -54,11 +54,11 @@
*/
public void redirect(boolean sessionmode, String newURL)
throws IOException {
- if (sessionmode == true) {
+ if (sessionmode) {
CommandLineSession.getSession(true);
- }
+ }
// fix all urls created with request.getScheme()+... etc.
- if (newURL.startsWith("cli:/") == true) {
+ if (newURL.startsWith("cli:/")) {
int pos = newURL.indexOf('/', 6);
newURL = newURL.substring(pos+1);
}
@@ -67,9 +67,9 @@
newURL = "cocoon:/" + newURL;
}
// FIXME: this is a hack for the links view
- if (newURL.startsWith("cocoon:") == true
+ if (newURL.startsWith("cocoon:")
&& this.getView() != null
- && this.getView().equals(Constants.LINK_VIEW) == true) {
+ && this.getView().equals(Constants.LINK_VIEW)) {
// as the internal cocoon protocol is used the last
// serializer is removed from it! And therefore
1.2 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/environment/commandline/CommandLineSession.java
Index: CommandLineSession.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/commandline/CommandLineSession.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CommandLineSession.java 3 Jan 2002 12:31:16 -0000 1.1
+++ CommandLineSession.java 22 Jan 2002 00:17:12 -0000 1.2
@@ -18,7 +18,7 @@
* Command-line version of Http Session.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:16 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:12 $
*/
public final class CommandLineSession
implements Session {
@@ -81,7 +81,7 @@
* Get the current session object - if available
*/
public static Session getSession(boolean create) {
- if (create == true && session == null) {
+ if (create && session == null) {
session = new CommandLineSession();
}
return session;
1.3 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/environment/commandline/LinkSamplingEnvironment.java
Index: LinkSamplingEnvironment.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/commandline/LinkSamplingEnvironment.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- LinkSamplingEnvironment.java 9 Jan 2002 21:30:10 -0000 1.2
+++ LinkSamplingEnvironment.java 22 Jan 2002 00:17:12 -0000 1.3
@@ -20,7 +20,7 @@
* This environment is sample the links of the resource.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefano Mazzocchi</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/09 21:30:10 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/01/22 00:17:12 $
*/
public class LinkSamplingEnvironment extends AbstractCommandLineEnvironment
@@ -48,7 +48,7 @@
*/
public void setContentType( String contentType )
{
- if ( Constants.LINK_CONTENT_TYPE.equals( contentType ) == false )
+ if ( ! Constants.LINK_CONTENT_TYPE.equals( contentType ) )
{
this.skip = true;
}
1.2 +1 -1
xml-cocoon2/src/java/org/apache/cocoon/environment/http/HttpContext.java
Index: HttpContext.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/http/HttpContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HttpContext.java 3 Jan 2002 12:31:16 -0000 1.1
+++ HttpContext.java 22 Jan 2002 00:17:13 -0000 1.2
@@ -53,7 +53,7 @@
}
public String getRealPath(String path) {
- if (path.equals("/") == true) {
+ if (path.equals("/")) {
String value = servletContext.getRealPath(path);
if (value == null) {
// Try to figure out the path of the root from that of WEB-INF
1.3 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java
Index: EnvironmentWrapper.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/EnvironmentWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- EnvironmentWrapper.java 21 Jan 2002 11:00:34 -0000 1.2
+++ EnvironmentWrapper.java 22 Jan 2002 00:17:13 -0000 1.3
@@ -30,7 +30,7 @@
* contains a <code>RequestWrapper</code> object.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version $Id: EnvironmentWrapper.java,v 1.2 2002/01/21 11:00:34 cziegeler Exp $
+ * @version $Id: EnvironmentWrapper.java,v 1.3 2002/01/22 00:17:13 vgritsenko Exp $
*/
public final class EnvironmentWrapper
extends AbstractEnvironment
@@ -77,7 +77,7 @@
Map oldObjectModel = env.getObjectModel();
Iterator keys = oldObjectModel.keySet().iterator();
String key;
- while (keys.hasNext() == true) {
+ while (keys.hasNext()) {
key = (String)keys.next();
this.objectModel.put(key, oldObjectModel.get(key));
}
@@ -95,7 +95,7 @@
this.redirectURL = newURL;
// check if session mode shall be activated
- if (sessionmode == true) {
+ if (sessionmode) {
// The session
Session session = null;
// get session from request, or create new session
1.2 +6 -6
xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/RequestParameters.java
Index: RequestParameters.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/RequestParameters.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RequestParameters.java 3 Jan 2002 12:31:16 -0000 1.1
+++ RequestParameters.java 22 Jan 2002 00:17:13 -0000 1.2
@@ -16,7 +16,7 @@
* for the <code>Request</code> object.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version $Id: RequestParameters.java,v 1.1 2002/01/03 12:31:16 giacomo Exp $
+ * @version $Id: RequestParameters.java,v 1.2 2002/01/22 00:17:13 vgritsenko Exp $
*/
public final class RequestParameters
implements Serializable {
@@ -84,7 +84,7 @@
*/
private void setParameter(String name, String value) {
ArrayList list;
- if (names.containsKey(name) == true) {
+ if (names.containsKey(name)) {
list = (ArrayList)names.get(name);
} else {
list = new ArrayList(3);
@@ -100,7 +100,7 @@
* or <CODE>null</CODE>
*/
public String getParameter(String name) {
- if (names.containsKey(name) == true) {
+ if (names.containsKey(name)) {
return (String)((ArrayList)names.get(name)).get(0);
}
return null;
@@ -114,7 +114,7 @@
* or <CODE>defaultValue</CODE>
*/
public String getParameter(String name, String defaultValue) {
- if (names.containsKey(name) == true) {
+ if (names.containsKey(name)) {
return (String)((ArrayList)names.get(name)).get(0);
}
return defaultValue;
@@ -127,11 +127,11 @@
* is not defined.
*/
public String[] getParameterValues(String name) {
- if (names.containsKey(name) == true) {
+ if (names.containsKey(name)) {
String values[] = null;
ArrayList list = (ArrayList)names.get(name);
Iterator iter = list.iterator();
- while (iter.hasNext() == true) {
+ while (iter.hasNext()) {
if (values == null) {
values = new String[1];
} else {
1.3 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java
Index: RequestWrapper.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/environment/wrapper/RequestWrapper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RequestWrapper.java 21 Jan 2002 11:00:34 -0000 1.2
+++ RequestWrapper.java 22 Jan 2002 00:17:13 -0000 1.3
@@ -23,7 +23,7 @@
* are different.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version $Id: RequestWrapper.java,v 1.2 2002/01/21 11:00:34 cziegeler Exp $
+ * @version $Id: RequestWrapper.java,v 1.3 2002/01/22 00:17:13 vgritsenko Exp $
*/
public final class RequestWrapper implements Request {
@@ -94,11 +94,11 @@
// put all parameter names into a set
Set parameterNames = new HashSet();
Enumeration names = this.parameters.getParameterNames();
- while (names.hasMoreElements() == true) {
+ while (names.hasMoreElements()) {
parameterNames.add(names.nextElement());
}
names = this.req.getParameterNames();
- while (names.hasMoreElements() == true) {
+ while (names.hasMoreElements()) {
parameterNames.add(names.nextElement());
}
return new EnumerationFromIterator(parameterNames.iterator());
1.3 +9 -17
xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java
Index: XMLResourceBundle.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/i18n/XMLResourceBundle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XMLResourceBundle.java 8 Jan 2002 05:44:54 -0000 1.2
+++ XMLResourceBundle.java 22 Jan 2002 00:17:13 -0000 1.3
@@ -32,7 +32,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Mike Engelhart</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Neeme Praks</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Oleg Podolsky</a>
- * @version $Id: XMLResourceBundle.java,v 1.2 2002/01/08 05:44:54 vgritsenko Exp $
+ * @version $Id: XMLResourceBundle.java,v 1.3 2002/01/22 00:17:13 vgritsenko Exp $
*/
public class XMLResourceBundle
extends ResourceBundle
@@ -318,16 +318,12 @@
*/
private String _getString(Node node, String key)
{
- String value = null;
- try
- {
- value = getTextValue(_getNode(node, key));
- }
- catch (Exception e)
- {
+ try {
+ return getTextValue(_getNode(node, key));
+ } catch (Exception e) {
logger.error(name + ": error while locating resource: " + key, e);
}
- return value;
+ return null;
}
/**
@@ -385,16 +381,12 @@
*/
private Node _getNode(Node rootNode, String key)
{
- Node node = null;
- try
- {
- node = this.processor.selectSingleNode(rootNode, key);
- }
- catch (Exception e)
- {
+ try {
+ return this.processor.selectSingleNode(rootNode, key);
+ } catch (Exception e) {
logger.error("Error while locating resource with key: " + key, e);
}
- return node;
+ return null;
}
/**
1.3 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/reading/DatabaseReader.java
Index: DatabaseReader.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/reading/DatabaseReader.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DatabaseReader.java 8 Jan 2002 10:47:45 -0000 1.2
+++ DatabaseReader.java 22 Jan 2002 00:17:13 -0000 1.3
@@ -84,14 +84,14 @@
this.datasource = (DataSourceComponent) dbselector.select(dsn);
this.con = datasource.getConnection();
- if (this.con.getAutoCommit() == true) {
+ if (this.con.getAutoCommit()) {
this.con.setAutoCommit(false);
}
PreparedStatement statement = con.prepareStatement(getQuery());
statement.setString(1, this.source);
ResultSet set = statement.executeQuery();
- if (set.next() == false) throw new ResourceNotFoundException("There is
no resource with that key");
+ if (!set.next()) throw new ResourceNotFoundException("There is no
resource with that key");
Response response = (Response)
objectModel.get(Constants.RESPONSE_OBJECT);
Request request = (Request) objectModel.get(Constants.REQUEST_OBJECT);
1.3 +4 -4
xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java
Index: CocoonServlet.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/servlet/CocoonServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CocoonServlet.java 9 Jan 2002 08:16:28 -0000 1.2
+++ CocoonServlet.java 22 Jan 2002 00:17:13 -0000 1.3
@@ -66,7 +66,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Leo Sutic</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/09 08:16:28 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/01/22 00:17:13 $
*/
public class CocoonServlet extends HttpServlet {
@@ -451,7 +451,7 @@
protected String getExtraClassPath()
throws ServletException {
String extraClassPath = this.getInitParameter("extra-classpath");
- if ((extraClassPath != null) && (extraClassPath.trim().equals("") ==
false)) {
+ if ((extraClassPath != null) && !extraClassPath.trim().equals("")) {
StringBuffer sb = new StringBuffer();
StringTokenizer st = new StringTokenizer(extraClassPath,
System.getProperty("path.separator"), false);
int i = 0;
@@ -1035,7 +1035,7 @@
*/
private Cocoon getCocoon(final String pathInfo, final String reloadParam)
throws ServletException {
- if (this.cocoon != null && this.allowReload == true) {
+ if (this.cocoon != null && this.allowReload) {
if (this.cocoon.modifiedSince(this.creationTime)) {
if (log.isInfoEnabled()) {
log.info("Configuration changed reload attempt");
@@ -1051,7 +1051,7 @@
this.createCocoon();
return this.cocoon;
}
- } else if ((pathInfo == null) && (this.allowReload == true) && (reloadParam
!= null)) {
+ } else if ((pathInfo == null) && this.allowReload && (reloadParam != null))
{
if (log.isInfoEnabled()) {
log.info("Invalid configurations reload");
}
1.2 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java
Index: ParanoidCocoonServlet.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/servlet/ParanoidCocoonServlet.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ParanoidCocoonServlet.java 3 Jan 2002 12:31:20 -0000 1.1
+++ ParanoidCocoonServlet.java 22 Jan 2002 00:17:13 -0000 1.2
@@ -22,7 +22,7 @@
* of it.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:20 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:13 $
*/
public class ParanoidCocoonServlet extends CocoonServlet {
@@ -52,13 +52,13 @@
String classDir;
File root;
- if ((classDirPath != null) && (classDirPath.trim().equals("") == false)) {
+ if ((classDirPath != null) && !classDirPath.trim().equals("")) {
classDir = classDirPath;
} else {
classDir = this.servletContext.getRealPath("/WEB-INF/classes");
}
- if ((libDirPath != null) && (libDirPath.trim().equals("") == false)) {
+ if ((libDirPath != null) && !libDirPath.trim().equals("")) {
root = new File(libDirPath);
} else {
root = new File(this.servletContext.getRealPath("/WEB-INF/lib"));
1.2 +4 -4
xml-cocoon2/src/java/org/apache/cocoon/sitemap/ContentAggregator.java
Index: ContentAggregator.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/ContentAggregator.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ContentAggregator.java 3 Jan 2002 12:31:20 -0000 1.1
+++ ContentAggregator.java 22 Jan 2002 00:17:13 -0000 1.2
@@ -33,7 +33,7 @@
/**
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Id: ContentAggregator.java,v 1.1 2002/01/03 12:31:20 giacomo Exp $
+ * @version CVS $Id: ContentAggregator.java,v 1.2 2002/01/22 00:17:13 vgritsenko
Exp $
*/
public class ContentAggregator
extends ContentHandlerWrapper
@@ -86,7 +86,7 @@
*/
public void generate()
throws IOException, SAXException, ProcessingException {
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
getLogger().debug("ContentAggregator: generating aggregated content");
}
this.contentHandler.startDocument();
@@ -191,7 +191,7 @@
this.rootElement = new Element(element,
namespace,
prefix);
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("ContentAggregator: root element='" + element +
"' ns='" + namespace + "' prefix='" + prefix +
"'");
}
@@ -220,7 +220,7 @@
this.parts.add(new Part(uri,
elem,
stripRootElement));
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("ContentAggregator: part uri='" + uri +
"' element='" + element + "' ns='" + namespace +
"' stripRootElement='" + stripRootElement + "'
prefix='" + prefix + "'");
1.3 +2 -2
xml-cocoon2/src/java/org/apache/cocoon/sitemap/SitemapComponentSelector.java
Index: SitemapComponentSelector.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/SitemapComponentSelector.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SitemapComponentSelector.java 15 Jan 2002 11:10:52 -0000 1.2
+++ SitemapComponentSelector.java 22 Jan 2002 00:17:13 -0000 1.3
@@ -23,7 +23,7 @@
/** Default component manager for Cocoon's sitemap components.
* @author <a href="mailto:[EMAIL PROTECTED]">Berin Loritsch</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Id: SitemapComponentSelector.java,v 1.2 2002/01/15 11:10:52
sylvain Exp $
+ * @version CVS $Id: SitemapComponentSelector.java,v 1.3 2002/01/22 00:17:13
vgritsenko Exp $
*/
public class SitemapComponentSelector extends ExcaliburComponentSelector
implements OutputComponentSelector {
@@ -80,7 +80,7 @@
}
public String getMimeTypeForHint(Object hint) {
- if (this.mime_types.containsKey(hint) == true) {
+ if (this.mime_types.containsKey(hint)) {
return (String)this.mime_types.get(hint);
}
if (this.parentSelector != null) {
1.3 +3 -3
xml-cocoon2/src/java/org/apache/cocoon/sitemap/SitemapManager.java
Index: SitemapManager.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/sitemap/SitemapManager.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SitemapManager.java 19 Jan 2002 00:51:45 -0000 1.2
+++ SitemapManager.java 22 Jan 2002 00:17:13 -0000 1.3
@@ -38,7 +38,7 @@
* to Java code.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
- * @version CVS $Revision: 1.2 $ $Date: 2002/01/19 00:51:45 $
+ * @version CVS $Revision: 1.3 $ $Date: 2002/01/22 00:17:13 $
*/
public class SitemapManager extends Manager implements Processor, Configurable {
@@ -58,10 +58,10 @@
this.sitemapFileName = sconf.getAttribute("file");
String value = sconf.getAttribute("check-reload", "yes");
- this.checkSitemapReload = !(value != null && value.equalsIgnoreCase("no")
== true);
+ this.checkSitemapReload = !(value != null && value.equalsIgnoreCase("no"));
value = sconf.getAttribute("reload-method", "asynchron");
- this.reloadSitemapAsynchron = !(value != null &&
value.equalsIgnoreCase("synchron") == true);
+ this.reloadSitemapAsynchron = !(value != null &&
value.equalsIgnoreCase("synchron"));
long checkDelay = sconf.getAttributeAsLong("check-delay", 1L);
Handler.setSitemapCheckDelay(checkDelay * 1000L);
1.6 +4 -5
xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
Index: TraxTransformer.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TraxTransformer.java 17 Jan 2002 20:14:32 -0000 1.5
+++ TraxTransformer.java 22 Jan 2002 00:17:13 -0000 1.6
@@ -113,7 +113,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Mark H. Butler</a>
- * @version CVS $Id: TraxTransformer.java,v 1.5 2002/01/17 20:14:32 vgritsenko Exp $
+ * @version CVS $Id: TraxTransformer.java,v 1.6 2002/01/22 00:17:13 vgritsenko Exp $
*/
public class TraxTransformer extends AbstractTransformer
implements Transformer, Composable, Recyclable, Configurable, Cacheable, Disposable
{
@@ -191,7 +191,7 @@
this.useDeli = child.getValueAsBoolean(false);
this._useDeli = this.useDeli;
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Use parameters is " + this.useParameters +
" for " + this);
this.getLogger().debug("Use cookies is " + this.useCookies + " for
" + this);
this.getLogger().debug("Use browser capabilities is " +
this.useBrowserCap + " for " + this);
@@ -251,7 +251,7 @@
_useDeli = par.getParameterAsBoolean("use-deli", this.useDeli);
_useCookies = par.getParameterAsBoolean("use-cookies", this.useCookies);
_useSessionInfo = par.getParameterAsBoolean("use-session-info",
this.useSessionInfo);
- if (this.getLogger().isDebugEnabled() == true) {
+ if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Using stylesheet:
'"+this.inputSource.getSystemId()+"' in " + this + ", last modified: " +
this.inputSource.getLastModified());
}
@@ -461,8 +461,7 @@
/* add the accept param */
map.put("accept", accept);
} else {
- // FIXME (VG): Is this an error condition?
- getLogger().warn("Deli is not available! Capabilities are not
set.");
+ getLogger().warn("TraxTransformer configured to use DELI in
sitemap.xmap but DELI not enabled in cocoon.xconf.");
}
} catch (Exception e) {
1.2 +4 -4
xml-cocoon2/src/java/org/apache/cocoon/util/log/XMLCocoonLogFormatter.java
Index: XMLCocoonLogFormatter.java
===================================================================
RCS file:
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/util/log/XMLCocoonLogFormatter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XMLCocoonLogFormatter.java 3 Jan 2002 12:31:22 -0000 1.1
+++ XMLCocoonLogFormatter.java 22 Jan 2002 00:17:13 -0000 1.2
@@ -50,7 +50,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sylvain Wallez</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
- * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:22 $
+ * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 00:17:13 $
*/
public class XMLCocoonLogFormatter
implements Formatter {
@@ -265,14 +265,14 @@
protected int getTypeIdFor( final String type ) {
int index = 0;
boolean found = false;
- while (found == false && index < typeStrings.length) {
- if (type.equalsIgnoreCase(typeStrings[index]) == true) {
+ while (!found && index < typeStrings.length) {
+ if (type.equalsIgnoreCase(typeStrings[index])) {
found = true;
} else {
index++;
}
}
- if (found == true) return index;
+ if (found) return index;
throw new IllegalArgumentException( "Unknown Type - " + type );
}
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]