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

          CodingFabian created issue -
          Marek Potociar made changes -
          Field Original Value New Value
          Fix Version/s 1.18 [ 16284 ]
          Affects Version/s 1.17 [ 16252 ]
          Marek Potociar made changes -
          Link This issue is related to JERSEY-1672 [ JERSEY-1672 ]
          Marek Potociar made changes -
          Original Estimate 3 hours [ 10800 ]
          Remaining Estimate 3 hours [ 10800 ]
          Miroslav Fuksa made changes -
          Assignee Miroslav Fuksa [ mfuksa ]
          Miroslav Fuksa made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Miroslav Fuksa made changes -
          Remaining Estimate 3 hours [ 10800 ] 2 hours [ 7200 ]
          Time Spent 1 hour [ 3600 ]
          Miroslav Fuksa made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Cannot Reproduce [ 5 ]
          Marek Potociar made changes -
          Remaining Estimate 2 hours [ 7200 ] 0 minutes [ 0 ]

            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