jersey
  1. jersey
  2. JERSEY-974

RuntimeDelegate.HeaderDelegate<T>.toString(null) throws NullPointException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.12
    • Fix Version/s: 2.0-m07, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      Javadoc says:

      RuntimeDelegate.HeaderDelegate<T>.toString
      throws
      java.lang.IllegalArgumentException - if the supplied object cannot be serialized or is null

      But unlike fromString, it throws NullPointerException

        Activity

        Hide
        Jakub Podlesak added a comment -

        There is number of HeaderDelegate implementations in the Jersey code base
        and from the description above i am not able to tell which one is affected.

        Could you please attach a reproducible test case to help me fix this?

        Show
        Jakub Podlesak added a comment - There is number of HeaderDelegate implementations in the Jersey code base and from the description above i am not able to tell which one is affected. Could you please attach a reproducible test case to help me fix this?
        Hide
        jan.supol added a comment -

        RuntimeDelegate delegate;
        delegate = RuntimeDelegate.getInstance();
        HeaderDelegate<MediaType> hdmt = delegate
        .createHeaderDelegate(MediaType.class);
        hdmt.toString(null);

        Show
        jan.supol added a comment - RuntimeDelegate delegate; delegate = RuntimeDelegate.getInstance(); HeaderDelegate<MediaType> hdmt = delegate .createHeaderDelegate(MediaType.class); hdmt.toString(null);
        Hide
        Jakub Podlesak added a comment -

        Thanks! It seems all HeaderDelegateProvider implementations are affected,
        not only the MediaTypeProvider implementation. We need to fix this.

        Show
        Jakub Podlesak added a comment - Thanks! It seems all HeaderDelegateProvider implementations are affected, not only the MediaTypeProvider implementation. We need to fix this.
        Hide
        Jakub Podlesak added a comment -

        patch file

        Show
        Jakub Podlesak added a comment - patch file

          People

          • Assignee:
            Jakub Podlesak
            Reporter:
            jan.supol
          • 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 - 3 hours
              3h