You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dg...@apache.org on 2003/11/27 20:20:31 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/actions LookupDispatchAction.java

dgraham     2003/11/27 11:20:31

  Modified:    src/share/org/apache/struts/actions
                        LookupDispatchAction.java
  Log:
  Removed reference to commons-lang StringUtils class.  This
  is the only non-test usage of commons-lang so this removal
  allows us to stop shipping lang with Struts.
  
  Revision  Changes    Path
  1.18      +22 -20    jakarta-struts/src/share/org/apache/struts/actions/LookupDispatchAction.java
  
  Index: LookupDispatchAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/actions/LookupDispatchAction.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- LookupDispatchAction.java	5 Oct 2003 17:48:57 -0000	1.17
  +++ LookupDispatchAction.java	27 Nov 2003 19:20:31 -0000	1.18
  @@ -70,7 +70,6 @@
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   
  -import org.apache.commons.lang.StringUtils;
   import org.apache.struts.Globals;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionForward;
  @@ -186,11 +185,11 @@
        * @exception Exception if an error occurs
        */
       public ActionForward execute(
  -            ActionMapping mapping,
  -            ActionForm form,
  -            HttpServletRequest request,
  -            HttpServletResponse response)
  -            throws Exception {
  +        ActionMapping mapping,
  +        ActionForm form,
  +        HttpServletRequest request,
  +        HttpServletResponse response)
  +        throws Exception {
   
           if (isCancelled(request)) {
               ActionForward af = cancelled(mapping, form, request, response);
  @@ -263,10 +262,12 @@
        * @return The method's localized name.
        * @throws ServletException if keyName cannot be resolved
        * @since Struts 1.2.0
  -     */ protected String getLookupMapName(HttpServletRequest request,
  -                                          String keyName,
  -                                          ActionMapping mapping)
  -            throws ServletException {
  +     */ 
  +    protected String getLookupMapName(
  +        HttpServletRequest request,
  +        String keyName,
  +        ActionMapping mapping)
  +        throws ServletException {
   
           // Based on this request's Locale get the lookupMap
           Map lookupMap = null;
  @@ -312,17 +313,18 @@
        * @return The method's name.
        * @since Struts 1.2.0
        */
  -    protected String getMethodName(ActionMapping mapping,
  -                                   ActionForm form,
  -                                   HttpServletRequest request,
  -                                   HttpServletResponse response,
  -                                   String parameter)
  -            throws Exception {
  +    protected String getMethodName(
  +        ActionMapping mapping,
  +        ActionForm form,
  +        HttpServletRequest request,
  +        HttpServletResponse response,
  +        String parameter)
  +        throws Exception {
   
           // Identify the method name to be dispatched to.
           // dispatchMethod() will call unspecified() if name is null
           String keyName = request.getParameter(parameter);
  -        if (StringUtils.isEmpty(keyName)) {
  +        if (keyName == null || keyName.length() == 0) {
               return null;
           }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org