[updater] dead code elimination

GitOrigin-RevId: 6712258b10e8993acda416d7f2c8d575acb5d779
This commit is contained in:
Roman Shevchenko
2024-05-24 09:38:39 +02:00
committed by intellij-monorepo-bot
parent c176f726bf
commit 63cb6eec67
2 changed files with 8 additions and 20 deletions

View File

@@ -5,15 +5,13 @@ import java.io.File;
import java.util.*;
public final class DiffCalculator {
public static Result calculate(Map<String, Long> oldChecksums, Map<String, Long> newChecksums) {
return calculate(oldChecksums, newChecksums, Set.of(), Set.of(), false);
}
public static Result calculate(Map<String, Long> oldChecksums,
Map<String, Long> newChecksums,
Set<String> critical,
Set<String> optional,
boolean lookForMoved) {
public static Result calculate(
Map<String, Long> oldChecksums,
Map<String, Long> newChecksums,
Set<String> critical,
Set<String> optional,
boolean lookForMoved
) {
Result result = new Result();
result.commonFiles = collect(oldChecksums, newChecksums, critical, true);
result.filesToDelete = withAllRemoved(oldChecksums, newChecksums);

View File

@@ -24,16 +24,6 @@ public class ZipOutputWrapper implements AutoCloseable {
myCompressed = compressionLevel > 0;
}
public OutputStream zipStream(String entryPath) {
return new OptByteArrayOutputStream() {
@Override
public void close() throws IOException {
super.close();
zipBytes(entryPath, this);
}
};
}
public void zipEntry(ZipEntry entry, InputStream from) throws IOException {
if (entry.isDirectory()) {
addDirs(entry.getName(), true);
@@ -104,4 +94,4 @@ public class ZipOutputWrapper implements AutoCloseable {
cs.update(buf, 0, count);
}
}
}
}