Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1494

StringBody constructor throws NPE if text is null

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tomasz.kalkosinski Tomasz KalkosiƄski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: