If I have the following string
a;b;c;;;f;;;
and I split this to get a String array the result is an array with just 6 elements in it. The last 3 elements (which would be empty strings) are not added to the array and this then leads to out of bounds exceptions.
The work around for me right now is to add some arbitrary value to the end of the string such as
a;b;c;;;f;;;end
and by doing so I'll get the desired result of an array containing 9 elements.
a;b;c;;;f;;;
and I split this to get a String array the result is an array with just 6 elements in it. The last 3 elements (which would be empty strings) are not added to the array and this then leads to out of bounds exceptions.
The work around for me right now is to add some arbitrary value to the end of the string such as
a;b;c;;;f;;;end
and by doing so I'll get the desired result of an array containing 9 elements.