Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cookies

 
Sonal Jogi
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Despite checking for the cookie array to be null, the below code throws a nullpointer exception at random (once in 50 times). Could anybody please tell me the reason why?


Thanks in advance,
sonal

[EDIT code tags added by Dave]
[ February 17, 2005: Message edited by: David O'Meara ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The stack trace should state which line the NPE is occuring on.
Post your stack trace.

Also, use the code button to wrap your code. This will preserve the formatting and make it much easier for us to read.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic