pjfanning commented on code in PR #392:
URL:
https://github.com/apache/pekko-persistence-jdbc/pull/392#discussion_r2573057162
##########
core/src/main/scala/org/apache/pekko/persistence/jdbc/testkit/internal/SchemaUtilsImpl.scala:
##########
@@ -202,7 +202,8 @@ private[jdbc] object SchemaUtilsImpl {
@InternalApi
private[jdbc] def fromClasspathAsString(fileName: String): String = {
val is = getClass.getClassLoader.getResourceAsStream(fileName)
- io.Source.fromInputStream(is).mkString
+ try io.Source.fromInputStream(is).mkString
+ finally is.close()
Review Comment:
try with resource works absolutely fine in Scala. We have it all over the
code.
I don't think Scala Using is any better than try.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]