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

Oleg Kalnichevski resolved HTTPCORE-301.
----------------------------------------

       Resolution: Duplicate
    Fix Version/s: 4.2.1

Please upgrade to 4.2.1.

Oleg
                
> StringEntity constructor throws null pointer exception if ContentType 
> parameter is null.
> ----------------------------------------------------------------------------------------
>
>                 Key: HTTPCORE-301
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-301
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.2
>            Reporter: Michael Fetzer
>             Fix For: 4.2.1
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> StringEntity constructor throws null pointer exception if ContentType 
> parameter is null. According to the documentation null is explicitly allowed. 
> The following line:
> Charset charset = contentType != null ? contentType.getCharset() : null;
> should be replaced by:
> if(contentType == null){
>    contentType = ContentType.TEXT_PLAIN;
> }
> Charset charset = contentType.getCharset();
> if(charset == null){
> // throw an exception? assume ContentType.TEXT_PLAIN.getCharset();?
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to