craigmcc 01/06/11 15:49:13 Modified: webapps/examples/WEB-INF/classes CookieExample.java Log: It is legal for getCookies() to return null. Revision Changes Path 1.2 +2 -2 jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/CookieExample.java Index: CookieExample.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/webapps/examples/WEB-INF/classes/CookieExample.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- CookieExample.java 2000/08/17 00:57:52 1.1 +++ CookieExample.java 2001/06/11 22:49:11 1.2 @@ -1,4 +1,4 @@ -/* $Id: CookieExample.java,v 1.1 2000/08/17 00:57:52 horwat Exp $ +/* $Id: CookieExample.java,v 1.2 2001/06/11 22:49:11 craigmcc Exp $ * */ @@ -50,7 +50,7 @@ out.println("<h3>" + title + "</h3>"); Cookie[] cookies = request.getCookies(); - if (cookies.length > 0) { + if ((cookies != null) && (cookies.length > 0)) { out.println(rb.getString("cookies.cookies") + "<br>"); for (int i = 0; i < cookies.length; i++) { Cookie cookie = cookies[i];