Support Article

java.lang.StringIndexOutOfBoundsException

SA-31935

Summary



Unable to upload files on pzMultiFilePath control when text has Turkish characters.

Error Messages



**Date and time**,768 [fault (self-tuning)'] [ ] [ ] [ ] ( web.impl.WebStandardImpl) ERROR - Unhandled error in ETier invocation
java.lang.StringIndexOutOfBoundsException: String index out of range: 124


Steps to Reproduce



Try to upload file C:\ğçşİİğğç öîİüûşçâ\ğçşİİğğç öîİüûşçâ.jpg using pzMultiFilePath control.

Root Cause



Conversion to lower case changes the length of string on some locales (like tr_TR). Start and end of an itemValue are calculated after converting original string to lower case. This is done because start and end are derived based on the itemKey, which can be in any case. After calculating start and end these indices are used on original string. If the lengths differ, out-of-bounds exception may occur.

Resolution



Apply HFix-30919.

Published December 28, 2016 - Updated January 5, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.