Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-5863

Potential null dereference in DistributedHerder#reconfigureConnector()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.8.0
    • connect
    • None

    Description

      Here is the call chain:

                                      RestServer.httpRequest(reconfigUrl, "POST", taskProps, null);
      

      In httpRequest():

                  } else if (responseCode >= 200 && responseCode < 300) {
                      InputStream is = connection.getInputStream();
                      T result = JSON_SERDE.readValue(is, responseFormat);
      

      For readValue():

          public <T> T readValue(InputStream src, TypeReference valueTypeRef)
              throws IOException, JsonParseException, JsonMappingException
          {
              return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef));
      

      Then there would be NPE in constructType():

          public JavaType constructType(TypeReference<?> typeRef)
          {
              // 19-Oct-2015, tatu: Simpler variant like so should work
              return _fromAny(null, typeRef.getType(), EMPTY_BINDINGS);
      

      Attachments

        Issue Links

          Activity

            People

              gharris1727 Greg Harris
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: