Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
1.5.3
-
None
Description
With latest version 1.5.3 I came across this stacktrace
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
|
 |
at java.lang.String.charAt(String.java:658)
|
at org.mariadb.jdbc.internal.packet.dao.parameters.StringParameter.escapeUtf8(StringParameter.java:197)
|
at org.mariadb.jdbc.internal.packet.dao.parameters.StringParameter.writeTo(StringParameter.java:81)
|
The root cause seems to be that StringParameter doesn't handel empty strings, which I think it should.
Here is e simple test case:
final StringParameter stringParameter = new StringParameter("", false); |
stringParameter.writeTo(new PacketOutputStream(new ByteArrayOutputStream(), false, 0)); |