hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCORE-234) EntityUtils.toString() should throw a different exception when the payload is out of range
Date Thu, 16 Sep 2010 11:50:32 GMT

     [ https://issues.apache.org/jira/browse/HTTPCORE-234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCORE-234.
----------------------------------------

    Resolution: Won't Fix

This problem has nothing to do with I/O or response parsing. It is about trying to coerce
an entity into a string of invalid length. I personally find IllegalArgumentException perfectly
appropriate in this case. 

Oleg

> EntityUtils.toString() should throw a different exception when the payload is out of
range
> ------------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-234
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-234
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: Examples
>    Affects Versions: 4.0.1
>            Reporter: Steve Loughran
>
> Looking at the code, I can see that {{EntityUtils.toString()}} throws an {{IllegalArgumentException}}
if the entity's content-length is >MAX_INT. But that's not technically a bad parameter,
it's that the response is out of range. More of an IOException or ParseException, rather than
a RunTime exception which a lot of code isn't going to expect to have to catch. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Mime
View raw message