Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368647

Summary: [server] IOoBE when getting the tags list
Product: [ECD] Orion Reporter: Szymon Brandys <Szymon.Brandys>
Component: GitAssignee: Malgorzata Janczarska <malgorzata.tomczyk>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 0.3   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 368425    

Description Szymon Brandys CLA 2012-01-16 03:44:14 EST
!ENTRY org.eclipse.orion.server.git 4 0 2012-01-16 09:40:46.784
!MESSAGE An error occured when listing tags for file/a9/
!STACK 0
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.ArrayList.RangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at org.eclipse.orion.server.git.jobs.ListTagsJob.performJob(ListTagsJob.java:138)
	at org.eclipse.orion.server.core.tasks.TaskJob.run(TaskJob.java:124)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

This happens when the page size is bigger than the actual size of the tag list. For example you have 3 tags and you are requesting ?page=1&pageSize=5.
In my case the following change in ListTagsJob line 137 helped:

for (int i = firstTag; (i <= lastTag && i < tags.size()); i++) {
Comment 1 Malgorzata Janczarska CLA 2012-01-16 04:48:30 EST
fixed