Menu

#16 ARFFHandler IndexOutOfBounds

closed-fixed
nobody
None
5
2012-07-29
2012-03-21
Anonymous
No

ARFFHandler.java throws an index out of bounds when the class index is -1. Comparing with FileHandler.java, I believe the change is from this:

if (i > classIndex)
values[i - 1] = val;

To this

if (i != -1 && i > classIndex)
values[i - 1] = val;

Discussion

  • Thomas Abeel

    Thomas Abeel - 2012-07-09

    That check brings nothing new to the table as i is a variable from 0 to number of attributes and should never be -1.

    I guess you meant if (classIndex != -1 && i > classIndex)

     
  • Thomas Abeel

    Thomas Abeel - 2012-07-09
    • status: open --> pending-fixed
     
  • Thomas Abeel

    Thomas Abeel - 2012-07-29
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.