Skip to content

Commit 98d9271

Browse files
committed
make getFieldNumberPool return null instead of throwing
1 parent 1fa52fb commit 98d9271

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/universal/pool/UniversalNumberPoolTransformer.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ protected void transform() throws Exception {
7575

7676
// Get whole number pool
7777
Number[] numberPool = getFieldNumberPool(numberPoolMatchCtx.insnContext().methodContext(), numberPoolSize, fieldRefPool);
78+
if (numberPool == null) {
79+
LOGGER.warn("Number pool is not fully initialized for {}#{}{}", numberPoolMatchCtx.insnContext().methodContext().classWrapper().name(), numberPoolMatchCtx.insnContext().methodContext().methodNode().name, numberPoolMatchCtx.insnContext().methodContext().methodNode().desc);
80+
return;
81+
}
7882

7983
Match numberPoolReferenceMatch;
8084
if (isPrimitiveArray) {
@@ -159,7 +163,7 @@ public static Number[] getFieldNumberPool(MethodContext methodContext, int poolS
159163
for (Number number : numberPool) {
160164
if (number == null) {
161165
// Number pool is not fully initialized
162-
throw new IllegalStateException("Number pool is not fully initialized");
166+
return null;
163167
}
164168
}
165169

0 commit comments

Comments
 (0)