Skip to content

Commit

Permalink
Incorrect toString for org.jacodb.api.cfg.JcNewArrayExpr #206
Browse files Browse the repository at this point in the history
  • Loading branch information
lehvolk committed Dec 5, 2023
1 parent 1c6a543 commit 207c306
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jacodb-api/src/main/kotlin/org/jacodb/api/cfg/JcInst.kt
Original file line number Diff line number Diff line change
Expand Up @@ -615,9 +615,9 @@ data class JcNewArrayExpr(
companion object {
private val regexToProcessDimensions = Regex("\\[(.*?)]")

private fun arrayTypeToStringWithDimensions(typeName: String, dimensions: List<JcValue>) {
private fun arrayTypeToStringWithDimensions(typeName: String, dimensions: List<JcValue>): String {
var curDim = 0
regexToProcessDimensions.replace(typeName) {
return regexToProcessDimensions.replace(typeName) {
"[${dimensions.getOrNull(curDim++) ?: ""}]"
}
}
Expand Down

0 comments on commit 207c306

Please sign in to comment.