jax-rs-spec
  1. jax-rs-spec
  2. JAX_RS_SPEC-384

AbstractMultivaluedMap throws NPE when List is inserted

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Invalid
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: model api
    • Labels:
      None

      Description

      The following results in NPE:

      MultivaluedMap<String, Object> m = new AbstractMultivaluedMap<String, Object>() {
      };
      List<Object> value1 = new ArrayList<Object>();
      value1.add("bar");
      value1.add("foo");
      m.put("baz", value1);
      

        Activity

        Hide
        Marek Potociar added a comment -

        I wonder how you managed to compile that code. There is no empty constructor on the AbstractMultivaluedMap. Closing as invalid. I'm adding a null check to AMM constructor though based on this issue.

        Show
        Marek Potociar added a comment - I wonder how you managed to compile that code. There is no empty constructor on the AbstractMultivaluedMap. Closing as invalid. I'm adding a null check to AMM constructor though based on this issue.

          People

          • Assignee:
            Marek Potociar
            Reporter:
            beryozkin_sergey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: