You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Tomasz Kalkosiński (JIRA)" <ji...@apache.org> on 2014/04/10 10:40:16 UTC
[jira] [Commented] (HTTPCLIENT-1494) StringBody constructor throws
NPE if text is null
[ https://issues.apache.org/jira/browse/HTTPCLIENT-1494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13965134#comment-13965134 ]
Tomasz Kalkosiński commented on HTTPCLIENT-1494:
------------------------------------------------
I've looked at this here: https://github.com/apache/httpclient/commit/cb983ea5b00be3781b193e0c19f3f639294df22a
Commit seems fine. Thank you.
> StringBody constructor throws NPE if text is null
> -------------------------------------------------
>
> Key: HTTPCLIENT-1494
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1494
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpMime
> Affects Versions: 4.3.1, 4.3.3
> Reporter: Tomasz Kalkosiński
> Fix For: 4.3.4, 4.4 Alpha1
>
>
> {code}
> public StringBody(final String text, final ContentType contentType)
> {code}
> This constructor throws NPE on text.getBytes(Charset) if passed text is null.
> Also, this constructor lacks javadoc.
> I think that is should handle null text gracefully, or throw IllegalArgumentException like it's documented on other constructors in case of null text.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org