Author: pbenedict Date: Mon Jul 16 18:59:13 2007 New Revision: 556789 URL: http://svn.apache.org/viewvc?view=rev&rev=556789 Log: STR-3068: Warn when using the classic RequestProcessor
Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java?view=diff&rev=556789&r1=556788&r2=556789 ============================================================================== --- struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java (original) +++ struts/struts1/trunk/core/src/main/java/org/apache/struts/action/ActionServlet.java Mon Jul 16 18:59:13 2007 @@ -40,6 +40,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.struts.Globals; +import org.apache.struts.chain.ComposableRequestProcessor; import org.apache.struts.config.ActionConfig; import org.apache.struts.config.ConfigRuleSet; import org.apache.struts.config.ExceptionConfig; @@ -617,6 +618,15 @@ "Cannot initialize RequestProcessor of class " + config.getControllerConfig().getProcessorClass() + ": " + e); + } + + // Emit a warning to the log if the classic RequestProcessor is + // being used without composition. Hopefully developers will + // heed this message and make the upgrade. + if (!(processor instanceof ComposableRequestProcessor)) { + log.warn("Use of the classic RequestProcessor is not recommended. " + + "Please upgrade to the ComposableRequestProcessor to " + + "receive the advantage of modern enhancements and fixes."); } processor.init(this, config);