IndexOutOfBoundsException in AnsweringFragment
Closed this issue · 0 comments
kplutchak commented
Line 153 of AnsweringFragment.java results in an IndexOutOfBoundsException after moving back and forth several times between AnsweringFragment and UserQuestionsFragment.
Line in question:
a2_2=q1.getChoices().get(index2).getAnswerID();
Error log:
java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.pipit.waffle.AnsweringFragment.onCreateView(AnsweringFragment.java:153)