ICU-8038 Fix BOM check in ICU4J TestConversion code.

X-SVN-Rev: 28821
This commit is contained in:
Michael Ow 2010-10-13 23:01:23 +00:00
parent 9d45127908
commit 0637aa7e4a

View File

@ -1060,8 +1060,10 @@ public class TestConversion extends ModuleTest {
output.rewind();
// remove any BOM signature before checking
detectUnicodeSignature(output); // sets the position to after the BOM
output = output.slice(); // removes anything before the current position
if (!cc.charset.contains("UnicodeLittle") && !cc.charset.contains("UnicodeBig")) {
detectUnicodeSignature(output); // sets the position to after the BOM
output = output.slice(); // removes anything before the current position
}
if (output.limit() != expected.limit()) {
errln("Test failed: output length does not match expected for charset: " + cc.charset