Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368647 - [server] IOoBE when getting the tags list
Summary: [server] IOoBE when getting the tags list
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Git (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 368425
  Show dependency tree
 
Reported: 2012-01-16 03:44 EST by Szymon Brandys CLA
Modified: 2012-01-16 04:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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