hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33437] - URI.getHost() generates IllegalArgumentException
Date Tue, 08 Feb 2005 09:22:39 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33437>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33437





------- Additional Comments From vesuvius_prime@hotmail.com  2005-02-08 10:22 -------
Hi Roland,

Thank you for the prompt reply!

What you are saying is right. The email addresses should not be parsed. And I 
didn't expect to get a host name from parsing it. But I was not expecting such 
an exception either. Perhaps getHost() could return a null or something, or 
throw an URIException, not a runtime exception.

The example that I gave was deliberately constructed to cause the exception. In 
real life, the code which extracts the host is different and is part of a 
bigger application which does some web crawling. The email address came from a 
site that we were crawling. I wasn't deliberately trying to parse it. It was 
just there inside the page. Normally, I would've expected, say, a null. 
However, I will modify the application to handle these cases more gracefully.

I will just wait a little more to hear your thoughts on whether the behaviour 
of getHost() should be modified or should remain the same. More specifically, 
is it okay for it to throw runtime exceptions. After that, I will close the 
bug. By the way, how should I close it? By marking it as WONTFIX?  :)

Thank you again, guys. You're all doing a great job. I appreciate it greatly!!!

Bisser

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message