String Index Out of Bounds Exception

From emmtrix Wiki
Jump to navigation Jump to search

When "Run Mapping & Scheduling" is executed, java.lang.SteeringIndexOutOfBoundsException may occur.

java.lang.StringIndexOutOfBoundsException: index 16015,length 15925
at java.base/java.lang.String.checkIndex(String.java:3278)
at java.base/java.lang.StringUTF16.checkIndex(StringUTF16.java:1470)
at java.base/java.lang.StringUTF16.charAt(StringUTF16.java:1267)
at java.base/java.lang.String.charAt(String.java:695)

Possible Reasons

The source code to be analyzed is treated as Shift-JIS.

Solution

Convert from Shift-JIS to UTF-8.

Reference

https://atmarkit.itmedia.co.jp/ait/articles/0804/18/news155.html (Japanese)