The code you posted will not throw ArrayIndexOutOfBoundsException.
The exception you get is thrown in the part you omitted. Take a look at your stacktrace. Its InboxSearchBean that causes the exception. Most likely it performs a get(index) on the list with an invalid index.