mirror of
https://github.com/revanced/multidexlib2.git
synced 2025-05-21 15:57:05 +02:00
Remove DexIO.getDexPoolOverflow
This commit is contained in:
parent
adc133ceac
commit
341f706f93
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user