tommy Tan <thong.h...@gmail.com> wrote on 01/17/2011 03:25:22 AM: > > Hi > I have found a problem when i use the method of > ArrayList(eg.ArrayList.addBefore((i: int, v: T))). > It seems to be used as inserting a element v before the ith element in > the ArrayList, but i have got a wrong result . > So, i search the addBefore((i: int, v: T) method of class ArrayList > in x10-2.1.0-src\x10.runtime\src-x10\x10\array\ArrayList.x10, > and i find the method writed like this : > public def addBefore(i: int, v: T): > Void { > a.add(v); > for (var j: int = i+1; j < > a.length(); j++) { > a(j) = a(j-1); > } > a(i) = v; > } > The loop for seems to be wrong.
Thanks for the bug report. We've opened: http://jira.codehaus.org/browse/XTENLANG-2335 --dave ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ X10-users mailing list X10-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/x10-users