in TransformCore/src/main/java/com/facebook/ads/injkit/SingleFileHandler.java [82:102]
private void handleConsumeZip(ZipRecursionHandler.ZipHandler handler, File zipOutput)
throws IOException, AnnotationProcessingException {
try (FileOutputStream fileOutput = new FileOutputStream(zipOutput);
ZipOutputStream zipOutputStream = new ZipOutputStream(fileOutput)) {
handler.handleZip(
(String path, boolean isClass, InputStream input) -> {
ZipEntry nextOutputEntry = new ZipEntry(path);
zipOutputStream.putNextEntry(nextOutputEntry);
try {
transform(path, input, zipOutputStream);
} catch (IOException e) {
throw new IOException(
String.format(Locale.US, "Failed to process zip entry '%s'", path), e);
} catch (AnnotationProcessingException e) {
throw new AnnotationProcessingException(
String.format(Locale.US, "Failed to process zip entry '%s'", path), e);
}
});
}
}