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-301) StringEntity constructor throws null pointer exception if ContentType parameter is null.
Date Wed, 27 Jun 2012 14:07:44 GMT

     [ 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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message