diff --git a/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java index 452a3087f..1796cce15 100644 --- a/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java +++ b/core/test/src/com/google/zxing/common/AbstractBlackBoxTestCase.java @@ -308,7 +308,12 @@ public abstract class AbstractBlackBoxTestCase extends Assert { } finally { reader.close(); } - return result.toString(); + String stringContents = result.toString(); + if (stringContents.endsWith("\n")) { + log.warning("String contents of file " + file + " end with a newline. " + + "This may not be intended and cause a test failure"); + } + return stringContents; } protected static BufferedImage rotateImage(BufferedImage original, float degrees) {