Add warning about test text files that may have a spurious newline

git-svn-id: https://zxing.googlecode.com/svn/trunk@2692 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen@gmail.com 2013-04-26 13:00:47 +00:00
parent a3228a81a8
commit 3fe141196c

View file

@ -308,7 +308,12 @@ public abstract class AbstractBlackBoxTestCase extends Assert {
} finally { } finally {
reader.close(); 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) { protected static BufferedImage rotateImage(BufferedImage original, float degrees) {