ArrayList<Fix> fixList = new ArrayList<Fix>();
StringTokenizer st = new StringTokenizer(idlist, ",");
int index = 0;
while(st.hasMoreElements()) {
Long id = Long.parseLong(st.nextElement().toString());
fixList.add(index++,fixManager.getFixById(id));
}
Arraylist here is able to take only one element. I debugged it, it takes only single element but count shows two or more elements are there in arraylist.
Are you sure that the fixManager returns objects for each call? If you try to add null, ArrayList does not complains.