We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0b82ca commit d4c5d59Copy full SHA for d4c5d59
java/src/main/kotlin/io/spine/validation/java/DistributingGenerator.kt
@@ -99,9 +99,11 @@ internal class DistributingGenerator(
99
returns(violationsType)
100
addCode(body)
101
}
102
- .toString() // `MethodSpec` cannot be directly added to `CodeBloc`.
103
- .replace("$", "$$") // We need to escape `$` symbols,
104
- // which can be present in error templates.
+ // `MethodSpec` cannot be added to `CodeBlock`, so we have to convert it to `String`.
+ // We also need to escape `$` symbols because they are part of JavaPoet templates.
+ // These symbols can be present in our own error message templates.
105
+ .toString()
106
+ .replace("$", "$$")
107
108
return otherMembers.toBuilder()
109
.add(groupingMethod)
0 commit comments