gnodet commented on code in PR #24580:
URL: https://github.com/apache/camel/pull/24580#discussion_r3558986479


##########
components/camel-mina-sftp/src/test/java/org/apache/camel/component/file/remote/mina/sftp/SftpChangedReadLockIT.java:
##########
@@ -65,7 +67,7 @@ public void testChangedReadLock() throws Exception {
 
         String content = context.getTypeConverter().convertTo(String.class, 
testDirectory.resolve("out/slowfile.dat").toFile());
         String[] lines = content.split(LS);
-        assertEquals(20, lines.length, "There should be 20 lines in the file");
+        assertEquals(20, lines.length, "There should be 20 lines in the 
file.\n" + lines);

Review Comment:
   Bug: `lines` is a `String[]`, so `"..." + lines` calls `Object.toString()` 
producing output like `[Ljava.lang.String;@1a2b3c4d` — not useful for debugging.
   
   Use `Arrays.toString(lines)` or `String.join("\n", lines)` instead:
   
   ```suggestion
           assertEquals(20, lines.length, "There should be 20 lines in the 
file.\n" + String.join("\n", lines));
   ```



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

Reply via email to