ItzSomebody/radon

[radon 3] NewArrayNode uses wrong operands (T_TYPE vs TYPE)

Closed this issue · 2 comments

Relevant:

public AbstractInsnNode getNode() {
if (wrappedType.isPrimitive()) {
return new IntInsnNode(Opcodes.NEWARRAY, wrappedType.getSort());
} else {
return new TypeInsnNode(Opcodes.ANEWARRAY, wrappedType.getInternalName());
}
}

WrappedType#getSort() makes a call to Type#getSort() which will give the incorrect operand for the desired array type. This particular line needs to be fixed so NewArrayNode feeds T_BYTE, T_INT, T_LONG, etc. instead to IntInsnNode.

Col-E commented

Radon 3 not dead confirmed???

Radon 3 not dead confirmed???

Might come back :)