Author: germuska Date: Mon May 2 06:14:43 2005 New Revision: 165626 URL: http://svn.apache.org/viewcvs?rev=165626&view=rev Log: Since JavaDoc says that an IllegalArgumentException will be thrown if there is no default MessageResources, go ahead and do that.
Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java?rev=165626&r1=165625&r2=165626&view=diff ============================================================================== --- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java (original) +++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java Mon May 2 06:14:43 2005 @@ -70,11 +70,13 @@ prefix + "'"); } actionCtx.setModuleConfig(moduleConfig); + String key = Globals.MESSAGES_KEY + prefix; MessageResources messageResources = (MessageResources) - actionCtx.getApplicationScope().get(Globals.MESSAGES_KEY + prefix); - if (messageResources != null) { - actionCtx.setMessageResources(messageResources); + actionCtx.getApplicationScope().get(key); + if (messageResources == null) { + throw new IllegalArgumentException("No message resources found in application scope under " + key); } + actionCtx.setMessageResources(messageResources); return (false); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]