Ericsson / ecaudit

Ericsson Audit plug-in for Apache Cassandra
Apache License 2.0
43 stars 36 forks source link

Ran into StringIndexOutOfBoundsException with Golang client for non-prepared statements #195

Closed piyengarr closed 2 years ago

piyengarr commented 2 years ago

We ran into the below exception when executing non-prepared statements with golang client:

java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.setCharAt(AbstractStringBuilder.java:407) at java.lang.StringBuilder.setCharAt(StringBuilder.java:76) at com.ericsson.bss.cassandra.ecaudit.entry.PreparedAuditOperation.preparedWithValues(PreparedAuditOperation.java:102) at com.ericsson.bss.cassandra.ecaudit.entry.PreparedAuditOperation.bindValues(PreparedAuditOperation.java:83)

This fix checks for non-zero size of columnSpecifications before proceeding further.

itskarlsson commented 2 years ago

Did you find a solution to your issue? Could you elaborate for people who might see the same?