On Wed, 17 Mar 2021 06:40:33 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:
>> Lin Zang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix typo in comments > > One more question. > > 1367 public synchronized void write(int b) throws IOException { > 1368 if (segmentMode && !writeThrough) { > 1369 if (segmentWritten == 0) { > 1370 // At the begining of the segment. > 1371 writeSegmentHeader(); > 1372 } else if (segmentWritten == segmentBuffer.length) { > 1373 // Internal buffer is full, extend a larger one. > 1374 int newSize = segmentBuffer.length + > SEGMENT_BUFFER_INC_SIZE; > 1375 byte newBuf[] = new byte[newSize]; > 1376 System.arraycopy(segmentBuffer, 0, newBuf, 0, > segmentWritten); > 1377 segmentBuffer = newBuf; > 1378 } > 1379 segmentBuffer[segmentWritten++] = (byte)b; > 1380 return; > 1381 } > 1382 super.write(b); > 1383 } > > Does the check for "!writeThrough" at L1368 means there is no need to write > the segment header (as at L1371)? Hi Serguei (@sspitsyn ), Really thanks for your help! Hi Chris (@plummercj ), Would you like to review the latest change again? There are not too much changes since your approval, but I think it is better if you could help take a look. @plummercj @sspitsyn , I will tag this PR with /integrate, and may need your help to sponsor it when it is ready. Thanks! BRs, Lin ------------- PR: https://git.openjdk.java.net/jdk/pull/2803