diff --git a/src/tools/android/java/com/google/devtools/build/android/r8/Desugar.java b/src/tools/android/java/com/google/devtools/build/android/r8/Desugar.java index ee5129a731ae06..46ba3fd46ef7cf 100644 --- a/src/tools/android/java/com/google/devtools/build/android/r8/Desugar.java +++ b/src/tools/android/java/com/google/devtools/build/android/r8/Desugar.java @@ -478,23 +478,6 @@ private void desugar( } } - private boolean isProgramClassForShard(int numberOfShards, int currentShard, String name) { - return getShardNumberForString(numberOfShards, name) == currentShard; - } - - private int getShardCount(Path input) throws IOException { - return max(1, ZipUtils.getNumberOfEntries(input) / NUMBER_OF_ENTRIES_PER_SHARD); - } - - private int getShardNumberForString(int numberOfShards, String string) { - // We group classes and inner classes to ensure that inner class annotations and nests are - // correctly handled. - if (string.contains("$")) { - string = string.substring(0, string.indexOf("$")); - } - return Math.floorMod(string.hashCode(), numberOfShards); - } - private void desugar() throws CompilationFailedException, IOException { // Prepare bootclasspath and classpath. Some jars on the classpath are considered to be // bootclasspath, and are moved there. @@ -531,6 +514,23 @@ private void desugar() throws CompilationFailedException, IOException { } } + private boolean isProgramClassForShard(int numberOfShards, int currentShard, String name) { + return getShardNumberForString(numberOfShards, name) == currentShard; + } + + private int getShardCount(Path input) throws IOException { + return max(1, ZipUtils.getNumberOfEntries(input) / NUMBER_OF_ENTRIES_PER_SHARD); + } + + private int getShardNumberForString(int numberOfShards, String string) { + // We group classes and inner classes to ensure that inner class annotations and nests are + // correctly handled. + if (string.contains("$")) { + string = string.substring(0, string.indexOf("$")); + } + return Math.floorMod(string.hashCode(), numberOfShards); + } + private static boolean isPlatform(ClassFileResourceProvider provider) { // See b/153106333. boolean mightBePlatform = false;