Fix lists being constructed in reverse

Well they still are, but they're reversed at the end.
This commit is contained in:
Josiah (Gaming32) Glosson 2023-05-13 07:28:43 -05:00
parent 636663274a
commit 384f8ca581

View File

@ -178,6 +178,13 @@ public class Java17ToJava8 implements IBytecodeTransformer {
list.add(new InsnNode(Opcodes.POP));
}
list.add(new VarInsnNode(Opcodes.ALOAD, freeVarIndex));
list.add(new InsnNode(Opcodes.DUP));
list.add(new MethodInsnNode(
Opcodes.INVOKESTATIC,
"java/util/Collections",
"reverse",
"(Ljava/util/List;)V"
));
list.add(new MethodInsnNode(Opcodes.INVOKESTATIC, "java/util/Collections", "unmodifiableList", "(Ljava/util/List;)Ljava/util/List;"));
}
} else if (min.name.equals("copyOf")) {