jersey
  1. jersey
  2. JERSEY-1841

ClientResponse.hasEntity() should not throw a NullPointerException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.17
    • Fix Version/s: 1.18
    • Component/s: core
    • Labels:
      None

      Description

      Similar to JERSEY-1672, the hasEntity method throws a null pointer exception when entity is null (like for a 500 response).
      When you have filters which look at possible JSON entities, it would be great to not get a null pointer.

      The workaround is to check for getEntityInputStream() != null first, which is kind of awkward.

        Issue Links

          Activity

          Miroslav Fuksa logged work - 07/Nov/13 12:00 AM
          • Time Spent:
            1 hour
             
            <No comment>

            People

            • Assignee:
              Miroslav Fuksa
              Reporter:
              CodingFabian
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3 hours
                3h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour Time Not Required
                1h