hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomasz Kalkosiński (JIRA) <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1494) StringBody constructor throws NPE if text is null
Date Tue, 08 Apr 2014 12:59:15 GMT
Tomasz Kalkosiński created HTTPCLIENT-1494:

             Summary: 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.3, 4.3.1
            Reporter: Tomasz Kalkosiński

public StringBody(final String text, final ContentType contentType)

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

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

View raw message