Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 330885

Summary: NullPointerException while crawling in the wild
Product: z_Archived Reporter: nils.thieme
Component: SmilaAssignee: Project Inbox <smila.irms-inbox>
Status: CLOSED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: daniel.stucky
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description nils.thieme CLA 2010-11-23 02:38:54 EST
A NullPointerException occurs in the Class "HttpResponse" when crawling in the wild. The error line is 116. It is because the variable "in" is null and access on it occurs.

The reason for this is the answer from the server. The answer code is 204 ("No Content"). So the client can't read in content.
Comment 1 Daniel Stucky CLA 2010-11-29 08:29:59 EST
Hi Nils,

thanks for your bug report. What exactly do you mean with "crawling in the wild" ? Do you have a sample URL that produces the described behavior and returns a HTTP status code 204 so that I can add a JUnit test ?

Anyway, I took a look at the code and added a check if the InputStream is null. This should prevent the NullPointerException to happend.

Bye,
Daniel
Comment 2 nils.thieme CLA 2010-11-30 09:08:08 EST
"Crawling in the wild" means start crawling from some random seeds and then crawl the web, not a specific web site or topic.

Unfortunately I have no url for your :-(. But if one appears I will sent it to you.

Thanks for fixing :-).
Comment 3 Igor Novakovic CLA 2012-02-14 12:09:28 EST
Closing this one since the problem cannot be reproduced.
Comment 4 Andreas Weber CLA 2013-04-15 11:48:23 EDT
Closing this