Sönke Liebau created KAFKA-4938:
-----------------------------------

             Summary: Creating a connector with missing name parameter throws a 
NullPointerException
                 Key: KAFKA-4938
                 URL: https://issues.apache.org/jira/browse/KAFKA-4938
             Project: Kafka
          Issue Type: Bug
          Components: KafkaConnect
    Affects Versions: 0.10.2.0
            Reporter: Sönke Liebau
            Priority: Minor


Creating a connector via the rest api runs into a NullPointerException, when 
omitting the name parameter in the request.

{code}
POST 127.0.0.1:8083/connectors
{
  "config": {
    "connector.class": "org.apache.kafka.connect.tools.MockSourceConnector",
    "tasks.max": "1",
    "topics": "test-topic"
  }
}
{code}

Results in a 500 return code, due to a NullPointerException being thrown when 
checking the name for slashes 
[here|https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/rest/resources/ConnectorsResource.java#L91].
 I believe this was introduced with the fix for 
[KAFKA-4372|https://issues.apache.org/jira/browse/KAFKA-4372]



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to