DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22526>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22526 FOM cocoon.request.getCookies()'s cookies can't be read ------- Additional Comments From [EMAIL PROTECTED] 2003-08-22 09:59 ------- There is another bug in the getCookies method: Cookie[] cookies = request.getCookies(); will set cookies to null if there are no cookies (this is by definition, deep donw in the core they discard the empty array - the api says it will return null if there are no cookies). the old code will trigger a NPE: FOM_Cookie[] FOM_cookies = new FOM_Cookie[cookies.length]; for (int i = 0 ; i < cookies.length ; ++i) { and should be replaced with: FOM_Cookie[] FOM_cookies = new FOM_Cookie[cookies!=null ? cookies.length : 0]; for (int i = 0 ; i < FOM_cookies.length ; ++i) { I will add a diff with the changes of the previous diff and the fix for this together.
