You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2022/08/01 07:44:10 UTC

[plc4x] 01/02: chore(plc4j): Undid the code-"improvement" IntelliJ suggested ;-)

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

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 1253f37257ad0ee3700b54b76f753682b1a1e0ab
Author: christoferdutz <ch...@c-ware.de>
AuthorDate: Mon Aug 1 09:43:19 2022 +0200

    chore(plc4j): Undid the code-"improvement" IntelliJ suggested ;-)
---
 .../org/apache/plc4x/test/migration/MessageValidatorAndMigrator.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/migration/MessageValidatorAndMigrator.java b/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/migration/MessageValidatorAndMigrator.java
index 53a1a784b..963fdb535 100644
--- a/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/migration/MessageValidatorAndMigrator.java
+++ b/plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/migration/MessageValidatorAndMigrator.java
@@ -140,7 +140,8 @@ public class MessageValidatorAndMigrator {
 
                     String content;
                     try {
-                        content = Files.readString(path, charset);
+                        // REMARK: In know IntelliJ tells us this is "optimizable", don't do it as it will break the build.
+                        content = new String(Files.readAllBytes(path), charset);
                         // Make sure this also works on Windows
                         // (Mainly when using git to check out Windows style and commit in Unix style)
                         content = content.replaceAll("\r\n", "\n");