My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 13: java.lang.IndexOutOfBoundsException
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Oct 2007
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by BarryBHunter, Oct 23, 2007
What steps will reproduce the problem?
1. Select a file in my Working Copy
2. Enter User/Pass of repository
3. Set High Limit and press Load

What is the expected output? What do you see instead?

... the file to load :)

java.lang.IndexOutOfBoundsException: toIndex = 25
	at java.util.SubList.<init>(Unknown Source)
	at java.util.RandomAccessSubList.<init>(Unknown Source)
	at java.util.AbstractList.subList(Unknown Source)
	at
com.jonathanaquino.svntimelapseview.SvnLoader.loadRevisionsProper(SvnLoader.java:89)
	at com.jonathanaquino.svntimelapseview.SvnLoader.access$0(SvnLoader.java:80)
	at com.jonathanaquino.svntimelapseview.SvnLoader$2.execute(SvnLoader.java:63)
	at
com.jonathanaquino.svntimelapseview.helpers.MiscHelper.handleExceptions(MiscHelper.java:24)
	at com.jonathanaquino.svntimelapseview.SvnLoader$1.run(SvnLoader.java:61)
	at java.lang.Thread.run(Unknown Source)


What version of the product are you using? On what operating system?

1.4 on Windows XP. Not sure version of Java, JNLP reports latest version
1.5.0_11 so guess that. 

Please provide any additional information below.

Seems to depend on the file, what limit will work. For example of the file
used in this example, 25 didnt work, but 10 did. On another file 100 didnt
but 50 did. 

(So far only seen it on private repositories, will add a note if get this
on a public repository) 

 
Comment 1 by BarryBHunter, Oct 23, 2007
ah, setting it to 100 on 
http://svn.geograph.org.uk/svn/trunk/public_html/kml.php
gives the same message. 

It seems to be if set it to a number higher than the revisions in the file it gives
this error, less and it works. 

Comment 2 by kimtiede, Oct 23, 2007
The following lines of code in SvnLoader should fix it. Replace the line:

List svnFileRevisionsToDownload = svnFileRevisions.subList(0, limit);

with:

List svnFileRevisionsToDownload = svnFileRevisions;
if (svnFileRevisions.size() > limit) {
  svnFileRevisionsToDownload = svnFileRevisions.subList(0, limit);
}

Cheers 

Kim
Comment 3 by jonathan.aquino, Oct 23, 2007
Thanks for the suggested fix.

Fixed in Revision 28.

Will be deployed as Version 1.5 in about an hour.
Status: Fixed
Sign in to add a comment

Hosted by Google Code