Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jdk/test/demo/zipfs/LargeCompressedEntrySizeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void testLargeCompressedSizeWithZipFS() throws Exception {
new Random().nextBytes(chunk);
final long start = System.currentTimeMillis();
for (long l = 0; l < largeEntrySize; l += chunkSize) {
final int numToWrite = (int)Math.min(remaining, chunkSize);
final int numToWrite = (int) Math.min(remaining, chunkSize);
os.write(chunk, 0, numToWrite);
remaining -= numToWrite;
}
Expand Down
6 changes: 3 additions & 3 deletions jdk/test/demo/zipfs/ZipFSOutputStreamTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ public void testOutputStream(final Map<String, ? > env) throws Exception {
while ((numRead = is.read(buf)) != -1) {
totalRead += numRead;
// verify the content
for (int i = 0, chunkoffset = (int)((totalRead - numRead) % chunk.length);
for (int i = 0, chunkoffset = (int) ((totalRead - numRead) % chunk.length);
i < numRead; i++, chunkoffset++) {
Assert.assertEquals(buf[i], chunk[chunkoffset % chunk.length],
"Unexpected content in " + entryPath);
}
}
Assert.assertEquals(totalRead, (long)entry.getValue(),
Assert.assertEquals(totalRead, (long) entry.getValue(),
"Unexpected number of bytes read from zip entry " + entryPath);
}
}
Expand All @@ -138,7 +138,7 @@ private static void writeAsChunks(final OutputStream os, final byte[] chunk,
final long totalSize) throws IOException {
long remaining = totalSize;
for (long l = 0; l < totalSize; l += chunk.length) {
final int numToWrite = (int)Math.min(remaining, chunk.length);
final int numToWrite = (int) Math.min(remaining, chunk.length);
os.write(chunk, 0, numToWrite);
remaining -= numToWrite;
}
Expand Down