You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/07/06 14:03:49 UTC
(pekko-management) branch main updated: chore: use StandardCharsets.UTF_8 (#875)
This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-management.git
The following commit(s) were added to refs/heads/main by this push:
new e249b49a chore: use StandardCharsets.UTF_8 (#875)
e249b49a is described below
commit e249b49adc29a8eca644d65949a99d8134eba4b1
Author: He-Pin(kerr) <he...@gmail.com>
AuthorDate: Mon Jul 6 22:03:43 2026 +0800
chore: use StandardCharsets.UTF_8 (#875)
Motivation:\nAvoid stringly-typed UTF-8 charset usage in encoding and decoding code paths.\n\nModification:\nReplace UTF-8 charset string arguments with StandardCharsets.UTF_8 and normalize touched XML declarations where applicable.\n\nResult:\nCharset usage is type-safe and exact lowercase "utf-8" string literals are removed from the touched areas.
---
.../org/apache/pekko/rollingupdate/kubernetes/KubernetesApiImpl.scala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rolling-update-kubernetes/src/main/scala/org/apache/pekko/rollingupdate/kubernetes/KubernetesApiImpl.scala b/rolling-update-kubernetes/src/main/scala/org/apache/pekko/rollingupdate/kubernetes/KubernetesApiImpl.scala
index 1b2639b4..c91fca20 100644
--- a/rolling-update-kubernetes/src/main/scala/org/apache/pekko/rollingupdate/kubernetes/KubernetesApiImpl.scala
+++ b/rolling-update-kubernetes/src/main/scala/org/apache/pekko/rollingupdate/kubernetes/KubernetesApiImpl.scala
@@ -14,6 +14,7 @@
package org.apache.pekko.rollingupdate.kubernetes
import java.util.Locale
+import java.nio.charset.StandardCharsets
import scala.collection.immutable
import scala.concurrent.ExecutionContext
import scala.concurrent.Future
@@ -455,7 +456,7 @@ PUTs must contain resourceVersions. Response:
val file = Paths.get(path)
if (Files.exists(file)) {
try {
- Some(new String(Files.readAllBytes(file), "utf-8"))
+ Some(new String(Files.readAllBytes(file), StandardCharsets.UTF_8))
} catch {
case NonFatal(e) =>
log.error(e, "Error reading {} from {}", name, path)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org