function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Shantanu Mahajan 4Shantanu Mahajan 4 

Getting Error List index out of bounds: 2060

Hii all,
I am getting this error List index out of bounds: 2060.
Here my Total Size is 2063.
for(Integer j=total_size-Math.mod(total_size,list_size);j<total_size;j++)
                    {
                        ListWrap.add(wraplist.get(j));
                    
                    }


                        
Peter Friberg 26Peter Friberg 26
Try to add an assertion of j against wraplist.size() inside the loop to see what happens.