pjfanning commented on code in PR #3143:
URL: https://github.com/apache/pekko/pull/3143#discussion_r3458401239


##########
remote/src/main/scala/org/apache/pekko/remote/artery/tcp/ssl/PemManagersProvider.scala:
##########
@@ -74,8 +73,7 @@ private[ssl] object PemManagersProvider {
    */
   @InternalApi
   private[ssl] def loadPrivateKey(filename: String): PrivateKey = blocking {
-    val bytes = Files.readAllBytes(new File(filename).toPath)
-    val pemData = new String(bytes, StandardCharsets.UTF_8)
+    val pemData = Files.readString(new File(filename).toPath)

Review Comment:
   can you pass StandardCharsets.UTF_8 param here just to make the code 
explicit? I agree this is the default for this API but it is easier to 
understand with the explicit param



-- 
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]

Reply via email to