LPS-32678 Possible IndexOutOfBoundsException in StringUtil.trim