Diff of /cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java
Parent Directory
| Revision Log
| Patch
--- cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java 2005/04/22 11:01:43 164218
+++ cocoon/blocks/supported/portal/trunk/java/org/apache/cocoon/portlet/ManagedCocoonPortlet.java 2005/04/22 11:03:32 164219
@@ -399,8 +399,7 @@ public class ManagedCocoonPortlet extend
// Add a unique request id (threadName + currentTime
ctxMap.set("request-id", threadName + System.currentTimeMillis());
- if (cocoon.process(env)) {
- } else {
+ if (!cocoon.process(env)) {
// We reach this when there is nothing in the processing change that matches
// the request. For example, no matcher matches.
getLogger().fatalError("The Cocoon engine failed to process the request.");
@@ -547,8 +546,7 @@ public class ManagedCocoonPortlet extend
// Add a unique request id (threadName + currentTime
ctxMap.set("request-id", threadName + System.currentTimeMillis());
- if (cocoon.process(env)) {
- } else {
+ if (!cocoon.process(env)) {
// We reach this when there is nothing in the processing change that matches
// the request. For example, no matcher matches.
getLogger().fatalError("The Cocoon engine failed to process the request.");
@@ -828,10 +826,9 @@ public class ManagedCocoonPortlet extend
if (getLogger() != null && getLogger().isDebugEnabled()) {
getLogger().debug(name + " was not set - defaulting to '" + defaultValue + "'");
}
- return defaultValue;
- } else {
- return result;
- }
+ result = defaultValue;
+ }
+ return result;
}
/** Convenience method to access boolean portlet parameters */
@@ -854,9 +851,8 @@ public class ManagedCocoonPortlet extend
getLogger().debug(name + " was not set - defaulting to '" + defaultValue + "'");
}
return defaultValue;
- } else {
- return Integer.parseInt(value);
}
+ return Integer.parseInt(value);
}
protected void initLogger() {