diff --git a/src/tools/java/com/google/devtools/build/android/dexer/DexFileSplitter.java b/src/tools/java/com/google/devtools/build/android/dexer/DexFileSplitter.java index aa0a2576..9272b95f 100644 --- a/src/tools/java/com/google/devtools/build/android/dexer/DexFileSplitter.java +++ b/src/tools/java/com/google/devtools/build/android/dexer/DexFileSplitter.java @@ -326,12 +326,12 @@ private void processDexes( for (GroupTask task : tasks) { List zipEntryAndContentses = new ArrayList<>(); - ZipEntryAndContent contextZdc = task.contextFuture().get(); + ZipEntryAndContent contextZdc = task.contextFuture.get(); checkNotNull( - contextZdc, "Context class %s expected to be in %s", task.filename(), task.zipName()); + contextZdc, "Context class %s expected to be in %s", task.filename, task.zipName); zipEntryAndContentses.add(contextZdc); - for (ListenableFuture synthFuture : task.syntheticFutures()) { + for (ListenableFuture synthFuture : task.syntheticFutures) { ZipEntryAndContent syntheticClassZdc = synthFuture.get(); // Some synthetic classes are contained within the same dex as their enclosing class, // so they won't be standalone dexes in the zip file, and some synthetic classes are @@ -343,7 +343,7 @@ private void processDexes( } } - processGroup(task.filename(), zipEntryAndContentses); + processGroup(task.filename, zipEntryAndContentses); } } executor.shutdown(); @@ -427,11 +427,23 @@ private ZipEntryAndContent readAndParseDex(ZipFile zip, String filename) { * Represents a unit of work for processing a context DEX file and its associated synthetic DEX * files in parallel. */ - private record GroupTask( - String filename, - String zipName, - ListenableFuture contextFuture, - List> syntheticFutures) {} + private static final class GroupTask { + final String filename; + final String zipName; + final ListenableFuture contextFuture; + final List> syntheticFutures; + + GroupTask( + String filename, + String zipName, + ListenableFuture contextFuture, + List> syntheticFutures) { + this.filename = filename; + this.zipName = zipName; + this.contextFuture = contextFuture; + this.syntheticFutures = syntheticFutures; + } + } private static final class ZipEntryAndContent { final ZipEntry zipEntry;