This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git

commit 9ca69d348afb71007a1a07d59e2e5c8b767cc7b5
Author: lburgazzoli <lburgazz...@gmail.com>
AuthorDate: Fri Apr 17 15:12:21 2020 +0200

    chore: leverage Java 11 Files.readString
---
 .../java/org/apache/camel/k/support/KubernetesPropertiesFunction.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/KubernetesPropertiesFunction.java
 
b/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/KubernetesPropertiesFunction.java
index e7fc299..f89073d 100644
--- 
a/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/KubernetesPropertiesFunction.java
+++ 
b/camel-k-runtime-core/src/main/java/org/apache/camel/k/support/KubernetesPropertiesFunction.java
@@ -55,7 +55,7 @@ public class KubernetesPropertiesFunction implements 
PropertiesFunction {
         Path file = this.root.resolve(name.toLowerCase()).resolve(property);
         if (Files.exists(file) && !Files.isDirectory(file)) {
             try {
-                return new String(Files.readAllBytes(file), 
StandardCharsets.UTF_8);
+                return Files.readString(file, StandardCharsets.UTF_8);
             } catch (IOException e) {
                 throw new RuntimeException(e);
             }

Reply via email to