rev 5690 : 8000210: Improve JarFile code quality Reviewed-by: ahgross, xuelei, mschoene
@@ -323,10 +323,14 @@ dataSize = dataPos; break; } } + if (unresolved != 0) { + throw new IOException("not all indef len BER resolved"); + } + newData = new byte[dataSize + numOfTotalLenBytes + unused]; dataPos=0; newDataPos=0; index=0; // write out the new byte array replacing all the indefinite-lengths // and EOCs