You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gk...@apache.org on 2008/03/08 16:16:52 UTC
svn commit: r634987 - in
/cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment:
AbstractEnvironment.java http/HttpEnvironment.java
Author: gkossakowski
Date: Sat Mar 8 07:16:52 2008
New Revision: 634987
URL: http://svn.apache.org/viewvc?rev=634987&view=rev
Log:
AbstractEnvironment does not extend AbstractLogEnabled anymore.
Modified:
cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/AbstractEnvironment.java
cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/http/HttpEnvironment.java
Modified: cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/AbstractEnvironment.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/AbstractEnvironment.java?rev=634987&r1=634986&r2=634987&view=diff
==============================================================================
--- cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/AbstractEnvironment.java (original)
+++ cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/AbstractEnvironment.java Sat Mar 8 07:16:52 2008
@@ -22,19 +22,16 @@
import java.util.HashMap;
import java.util.Map;
-import org.apache.commons.collections.iterators.IteratorEnumeration;
-
import org.apache.cocoon.Constants;
-import org.apache.cocoon.util.AbstractLogEnabled;
import org.apache.cocoon.util.BufferedOutputStream;
+import org.apache.commons.collections.iterators.IteratorEnumeration;
/**
* Base class for any environment
*
* @version $Id$
*/
-public abstract class AbstractEnvironment extends AbstractLogEnabled
- implements Environment {
+public abstract class AbstractEnvironment implements Environment {
/** The current uri in progress */
protected String uri;
Modified: cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/http/HttpEnvironment.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/http/HttpEnvironment.java?rev=634987&r1=634986&r2=634987&view=diff
==============================================================================
--- cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/http/HttpEnvironment.java (original)
+++ cocoon/whiteboard/micro/core/cocoon-pipeline/cocoon-pipeline-impl/src/main/java/org/apache/cocoon/environment/http/HttpEnvironment.java Sat Mar 8 07:16:52 2008
@@ -28,6 +28,8 @@
import org.apache.cocoon.environment.Context;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.util.NetUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/**
* HTTP Servlet environment.
@@ -40,6 +42,8 @@
public static final String HTTP_RESPONSE_OBJECT= "httpresponse";
public static final String HTTP_SERVLET_CONTEXT= "httpservletcontext";
+ private Log logger = LogFactory.getLog(getClass());
+
/** The HttpServletRequest */
private HttpServletRequest rawRequest;
@@ -141,8 +145,8 @@
// FIXME (VG): WebSphere 4.0/4.0.1 bug
if (!newURL.startsWith("/") && newURL.indexOf(':') == -1 && redirect.indexOf(':') != -1) {
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Redirect: WebSphere Bug Detected!");
+ if (logger.isDebugEnabled()) {
+ logger.debug("Redirect: WebSphere Bug Detected!");
}
String base = NetUtils.getPath(request.getRequestURI());
if (base.startsWith("/")) {
@@ -151,8 +155,8 @@
redirect = response.encodeRedirectURL(base + '/' + newURL);
}
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Sending redirect to '" + redirect + "'");
+ if (logger.isDebugEnabled()) {
+ logger.debug("Sending redirect to '" + redirect + "'");
}
if (permanent) {
@@ -228,17 +232,17 @@
try {
if (!this.response.isCommitted()) {
this.response.reset();
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Response successfully reset");
+ if (logger.isDebugEnabled()) {
+ logger.debug("Response successfully reset");
}
return true;
}
} catch (Exception e) {
// Log the error, but don't transmit it
- getLogger().warn("Problem resetting response", e);
+ logger.warn("Problem resetting response", e);
}
- if (getLogger().isDebugEnabled()) {
- getLogger().debug("Response wasn't reset");
+ if (logger.isDebugEnabled()) {
+ logger.debug("Response wasn't reset");
}
return false;
}