package com.blackberry.kafka.lowoverhead.meta;

import java.util.ArrayList;
import java.util.List;

public class Topic {
  String name;
  List<Partition> partitions = new ArrayList<Partition>();

  public Topic() {
  }

  public Topic(String name) {
    this.name = name;
  }

  public int getNumPartitions() {
    return partitions.size();
  }

  public Partition getPartition(int i) {
    return partitions.get(i);
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public List<Partition> getPartitions() {
    return partitions;
  }

  @Override
  public String toString() {
    return "Topic [name=" + name + ", partitions=" + partitions + "]";
  }
}

@@ -388,32 +388,120 @@
     
-return partitions.get(i)
+for (Partition p : partitions) %7B%0A      if (p.getPartId() == i) %7B%0A        return p;%0A      %7D%0A    %7D%0A    return null
 ;%0A  

Fix major bug which returned the wrong partition metadata