From 341f706f93358251a0bcb1b11f584e44a669b365 Mon Sep 17 00:00:00 2001 From: Lanchon Date: Thu, 13 Sep 2018 06:41:32 -0300 Subject: [PATCH] Remove DexIO.getDexPoolOverflow --- src/main/java/lanchon/multidexlib2/DexIO.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/lanchon/multidexlib2/DexIO.java b/src/main/java/lanchon/multidexlib2/DexIO.java index 6c74bd3..3c59ce5 100644 --- a/src/main/java/lanchon/multidexlib2/DexIO.java +++ b/src/main/java/lanchon/multidexlib2/DexIO.java @@ -55,7 +55,7 @@ public class DexIO { while (classIterator.hasNext()) { ClassDef classDef = classIterator.next(); dexPool.internClass(classDef); - if (getDexPoolOverflow(dexPool, maxDexPoolSize)) { + if (dexPool.hasOverflowed(maxDexPoolSize)) { handleDexPoolOverflow(classDef, classCount, classes.size()); throw new AssertionError("unexpected type count"); } @@ -139,7 +139,7 @@ public class DexIO { ClassDef classDef = classIterator.peek(); dexPool.mark(); dexPool.internClass(classDef); - if (getDexPoolOverflow(dexPool, maxDexPoolSize)) { + if (dexPool.hasOverflowed(maxDexPoolSize)) { handleDexPoolOverflow(classDef, fileClassCount, minMainDexClassCount); dexPool.reset(); break; @@ -160,10 +160,6 @@ public class DexIO { } while (classIterator.hasNext()); } - private static boolean getDexPoolOverflow(DexPool dexPool, int maxDexPoolSize) { - return dexPool.hasOverflowed(maxDexPoolSize); - } - private static void handleDexPoolOverflow(ClassDef classDef, int classCount, int minClassCount) { if (classCount < minClassCount) throw new DexPoolOverflowException( "Dex pool overflowed while writing type " + (classCount + 1) + " of " + minClassCount);