mbeckerle commented on code in PR #1422:
URL: https://github.com/apache/daffodil/pull/1422#discussion_r1945480188
##########
daffodil-propgen/src/main/scala/org/apache/daffodil/propGen/TunableGenerator.scala:
##########
@@ -292,7 +292,7 @@ class EnumListTunable(
"Nil"
} else {
val defaultSeq =
- trimmedDefault.split("\\s+").map(d =>
s"${listType}.${s"${d.head.toUpper}${d.tail}"}")
+ trimmedDefault.split("\\s+").map(d => s"${listType}.${d.head.toUpper
+: d.tail}")
Review Comment:
As above, this one is not just concatenating two strings.
So in this case a single string interpolation is the right thing.
```
s"${listType}.${d.head.toUpper}${d.tail}"
```
##########
daffodil-propgen/src/main/scala/org/apache/daffodil/propGen/PropertyGenerator.scala:
##########
@@ -762,7 +762,7 @@ import org.apache.daffodil.lib.exceptions.ThrowsSDE
def getGeneratedFilePath(rootDir: String, pkg: String, filename: String):
String = {
val outDir = new java.io.File(rootDir + "/" + pkg.split('.').reduceLeft(_
+ "/" + _))
outDir.mkdirs()
- val outPath = s"$outDir/$filename"
+ val outPath = String.valueOf(outDir) + "/" + filename
Review Comment:
This one is not just concatenating two strings, so I think this is better as
a string interpolation, particularly as it avoids the String.valueOf call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]