Github user srdo commented on a diff in the pull request:

    https://github.com/apache/storm/pull/1808#discussion_r91365926
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java
 ---
    @@ -185,7 +178,9 @@ private long doSeek(TopicPartition tp, 
OffsetAndMetadata committedOffset) {
         }
     
         private Collection<TopicPartition> toArrayList(final TopicPartition 
tp) {
    -        return new ArrayList<TopicPartition>(1){{add(tp);}};
    +        ArrayList<TopicPartition> ret = new ArrayList<>(1);
    --- End diff --
    
    Nit: Unless you need to modify the return value later, you can just return 
Collections.singleton(tp)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to