jira-importer opened a new issue, #954:
URL: https://github.com/apache/httpcomponents-core/issues/954

   
**[Zefi](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=zefifier)**
 opened 
**[HTTPCORE-324](https://issues.apache.org/jira/browse/HTTPCORE-324?redirect=false)**
 and commented
   
   Javadoc for EntityUtils.toString(HttpEntity, String) says "If defaultCharset 
is null, the default "ISO-8859-1" is used", but it actually throws 
IllegalArgumentException.
   
   Here's a test case to prove this:
   
   `@Test`
   public void shouldNotFailWhenNullCharsetStringIsGiven() throws Exception {
   try {
   EntityUtils.toString(Mockito.mock(HttpEntity.class), (String) null);
   } catch (IllegalArgumentException ex) {
   if (ex.getMessage().equals("Null charset name")) {
   throw new AssertionError("Should supply null charset with default");
   }
   }
   }
   
   
   ---
   
   **Affects:** 4.2.3
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to