fix copy/paste bug in exception message, plus whitespace

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1712789 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2015-11-05 14:56:23 +00:00
parent 9343bc9cab
commit 553a0920c3
1 changed files with 2 additions and 2 deletions

View File

@ -135,9 +135,9 @@ public final class CodecUtil {
out.writeBytes(id, 0, id.length);
BytesRef suffixBytes = new BytesRef(suffix);
if (suffixBytes.length != suffix.length() || suffixBytes.length >= 256) {
throw new IllegalArgumentException("codec must be simple ASCII, less than 256 characters in length [got " + suffix + "]");
throw new IllegalArgumentException("suffix must be simple ASCII, less than 256 characters in length [got " + suffix + "]");
}
out.writeByte((byte)suffixBytes.length);
out.writeByte((byte) suffixBytes.length);
out.writeBytes(suffixBytes.bytes, suffixBytes.offset, suffixBytes.length);
}