Ashish K Singh created KAFKA-2734:
-------------------------------------

             Summary: kafka-console-consumer throws NoSuchElementException on 
not specifying topic
                 Key: KAFKA-2734
                 URL: https://issues.apache.org/jira/browse/KAFKA-2734
             Project: Kafka
          Issue Type: Bug
          Components: tools
    Affects Versions: 0.9.0.0
            Reporter: Ashish K Singh
            Assignee: Ashish K Singh


The logic of argument checking is flawed for kafka-console-consumer. Throws 
below mentioned exception when topic is not specified. Users wont have a clue 
what went wrong.

{code}
Exception in thread "main" java.util.NoSuchElementException: head of empty list
        at scala.collection.immutable.Nil$.head(List.scala:337)
        at scala.collection.immutable.Nil$.head(List.scala:334)
        at 
kafka.tools.ConsoleConsumer$ConsumerConfig.<init>(ConsoleConsumer.scala:244)
        at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:40)
        at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to