tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets SnoopAllServlet.java
Date Tue, 08 May 2001 03:31:18 GMT
craigmcc    01/05/07 20:31:18

  Modified:    catalina/src/share/org/apache/catalina/servlets
                        SnoopAllServlet.java
  Log:
  Reflect the fact that getCookies() can return null.
  
  Revision  Changes    Path
  1.3       +6 -4      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SnoopAllServlet.java
  
  Index: SnoopAllServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SnoopAllServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SnoopAllServlet.java	2000/08/22 00:11:37	1.2
  +++ SnoopAllServlet.java	2001/05/08 03:31:18	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SnoopAllServlet.java,v
1.2 2000/08/22 00:11:37 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/08/22 00:11:37 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/SnoopAllServlet.java,v
1.3 2001/05/08 03:31:18 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/08 03:31:18 $
    *
    * ====================================================================
    *
  @@ -84,7 +84,7 @@
    * into an HTML page.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/08/22 00:11:37 $
  + * @version $Revision: 1.3 $ $Date: 2001/05/08 03:31:18 $
    */
   
   public final class SnoopAllServlet
  @@ -158,6 +158,8 @@
   	writer.println("<li><b>contextPath</b> = " +
   		       request.getContextPath());
   	Cookie cookies[] = request.getCookies();
  +        if (cookies == null)
  +            cookies = new Cookie[0];
   	for (int i = 0; i < cookies.length; i++)
   	    writer.println("<li><b>cookie</b> " + cookies[i].getName() +
   			   " = " + cookies[i].getValue());
  
  
  

Mime
View raw message