IndexOutOfBoundsException: Index: 15, Size: 19
问题 So I was combing through some logs from our web server the other day (looking for something else), when something peculiar caught my eye. java.lang.IndexOutOfBoundsException: Index: 15, Size: 19 at java.util.ArrayList.rangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) This seemed impossible to me. I looked up the source code for ArrayList#rangeCheck and it blew my mind private void rangeCheck(int index) { if (index >= size) throw new IndexOutOfBoundsException(outOfBoundsMsg