ICU-5410 Improve code coverage in UTF32 by fixing unreachable code during the writing of BOM.

X-SVN-Rev: 21938
This commit is contained in:
Michael Ow 2007-07-10 21:04:37 +00:00
parent ffdf8ead9b
commit b927bb5189

View File

@ -373,7 +373,7 @@ class CharsetUTF32 extends CharsetICU {
if(fromUnicodeStatus==NEED_TO_WRITE_BOM && writeBOM) {
byte[] bom={ 0, 0, (byte)0xfe, (byte)0xff };
cr = fromUWriteBytes(this, bom, 0, bom.length, target, offsets, -1);
if(cr.isError()){
if(cr.isError() || cr.isOverflow()){
return cr;
}
fromUnicodeStatus=0;