From f4db9ceb17094e1c8046306797ff79dc3966dcc9 Mon Sep 17 00:00:00 2001 From: Googler Date: Tue, 7 Dec 2021 04:12:25 -0800 Subject: [PATCH] Automatic code cleanup. PiperOrigin-RevId: 414681149 --- .../devtools/build/android/r8/Desugar.java | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) 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;