While your codelooks VERY familiar J you seemed to have changed the ‘for’loop to increment until i <=numItems+1 instead of as I have it in my code to
i<=numItems-1.
That is, youput a + instead of a – so your code loops beyond the number of items inthe recArray.
Howard ___ Howard Pell Senior Technical Educator Liaison, Special Projects Open Text Corporation www.opentext.com (519) 888-7111 Ext. 2203
From:eLink Discussion: LAPI Discussion [mailto:lapi@elinkkc.opentext.com] Sent: Tuesday, October 23, 20072:50 PMTo: eLink RecipientSubject: IndexoutofBoundsExceptionLLValue Index out of Bounds 11
IndexoutofBoundsException LLValue Index out of Bounds 11
Posted by biopkomawar (Komawar, Pranjali) on 10/23/2007 02:46 PM
Hi, I am working on a LAPI program in Java to scan and print a given Parent folder and all its subfolders , however after scanning the first subfolder of the Parent , the program stops and gives the message :- LLIndexOutOfBoundsException : LLValue index out of bounds : 11 Can anybody please help from the attached program. Thanks in advance for any thoughts shared.
LAPI is zerobased.
Consider anexample of a recarray with 10 records. The “first” record isactually record 0 and the last record is record 9. When we get the size of therecarray we learn there are 10 records, so we count 0 to size-1 (10-1 = 9).
Does that help?
From:eLink Discussion: LAPI Discussion [mailto:lapi@elinkkc.opentext.com] Sent: Tuesday, October 23, 20073:42 PMTo: eLink RecipientSubject: Thanks for your help.Initially I had
Thanks for your help. Initially I had
Posted by biopkomawar (Komawar, Pranjali) on 10/23/2007 03:38 PM
In reply to: RE IndexoutofBoundsException LLValue Index out of Bounds 11
Posted by hlpell (Pell, Howard) on 10/23/2007 03:21 PM
Thanks for your help. Initially I had i<= numItems but I was getting Exception , then I changed it to i<=numItems+1 Changing it to numItems-1 solved the problem , but logically I cannot understand as why do we even need +1 or -1 since I want the loop to run untill its equal to size() of the RecArray.