fritzbrand / svn-time-lapse-view

Automatically exported from code.google.com/p/svn-time-lapse-view
0 stars 0 forks source link

java.lang.IndexOutOfBoundsException #13

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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(MiscHelp
er.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) 

Original issue reported on code.google.com by BarryBHu...@gmail.com on 23 Oct 2007 at 11:59

GoogleCodeExporter commented 8 years ago
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. 

Original comment by BarryBHu...@gmail.com on 23 Oct 2007 at 12:01

GoogleCodeExporter commented 8 years ago
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

Original comment by kimti...@gmail.com on 23 Oct 2007 at 3:23

GoogleCodeExporter commented 8 years ago
Thanks for the suggested fix.

Fixed in Revision 28.

Will be deployed as Version 1.5 in about an hour.

Original comment by jonathan...@gmail.com on 24 Oct 2007 at 1:39