struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-struts/src/share/org/apache/struts/action ActionMapping.java
Date Thu, 04 Oct 2001 03:01:18 GMT
craigmcc    01/10/03 20:01:18

  Modified:    src/share/org/apache/struts/action Tag: STRUTS_1_0_BRANCH
                        ActionMapping.java
  Log:
  Avoid a NullPointerException in corner cases caused by failed
  initialization of ActionServlet.
  
  PR: Bugzilla #2226
  Submitted by:	Martin Zaidel <mzaidel@yahoo.com>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.17.2.1  +12 -5     jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java
  
  Index: ActionMapping.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java,v
  retrieving revision 1.17
  retrieving revision 1.17.2.1
  diff -u -r1.17 -r1.17.2.1
  --- ActionMapping.java	2001/03/23 22:21:34	1.17
  +++ ActionMapping.java	2001/10/04 03:01:18	1.17.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java,v
1.17 2001/03/23 22:21:34 craigmcc Exp $
  - * $Revision: 1.17 $
  - * $Date: 2001/03/23 22:21:34 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java,v
1.17.2.1 2001/10/04 03:01:18 craigmcc Exp $
  + * $Revision: 1.17.2.1 $
  + * $Date: 2001/10/04 03:01:18 $
    *
    * ====================================================================
    *
  @@ -161,7 +161,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.17 $ $Date: 2001/03/23 22:21:34 $
  + * @version $Revision: 1.17.2.1 $ $Date: 2001/10/04 03:01:18 $
    */
   
   public class ActionMapping implements Serializable {
  @@ -863,7 +863,14 @@
               return (forward);
   
           // Second, check the globally defined forwards
  -        return (getMappings().getServlet().findForward(name));
  +        ActionMappings mappings = getMappings();
  +        if (mappings == null)
  +            return (null);
  +        ActionServlet servlet = mappings.getServlet();
  +        if (servlet == null)
  +            return (null);
  +        else
  +            return (servlet.findForward(name));
   
       }
   
  
  
  

Mime
View raw message