Fix MessageFormatTest#test_setFormat

formats array may have more space than the number of format elements in
the pattern string. We need to explicitly check the range and throw
ArrayIndexOutOfBoundsException when the element index is nonexistant.

Bug: 26207029
Change-Id: I38efb945b3c7974cad946fa1a52569a225075cbd
1 file changed