added proper index checks for lists in java
added proper index checks for lists in java

pellaeon/tinyspline-example,msteinbeck/tinyspline,retuxx/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,arneboe/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,pellaeon/tinyspline-example,msteinbeck/tinyspline,msteinbeck/tinyspline,msteinbeck/tinyspline,arneboe/tinyspline,retuxx/tinyspline,retuxx/tinyspline