Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-375

Remove unnecessary throws UnsupportedEncodingException

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.4-alpha1
    • 5.0-alpha1
    • HttpCore
    • None

    Description

      StringEntity has constructors that unneccessarily declare 'throws UnsupportedEncodingException'. This over-complicates client code because you have to set up a lot of "this should never happen" exception handling.

      There's also a constructor that uses 'String.getBytes(String)', that should instead be using 'String.getBytes(Charset)'.

      Attachments

        1. HTTPCORE-375.patch
          3 kB
          Robin Skoglund

        Activity

          People

            Unassigned Unassigned
            robinsk Robin Skoglund
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: