Shall CheckMethodAdapter.Method.visitLabel throw IllegalStateException?
I notice that this method throws IllegalArgumentException:
public void visitLabel(final Label label) { checkVisitCodeCalled(); checkVisitMaxsNotCalled(); checkLabel(label, false, "label"); if (labelInsnIndices.get(label) != null) { throw new IllegalArgumentException("Already visited label"); } labelInsnIndices.put(label, insnCount); super.visitLabel(label); }
IllegalArgumentException shall be thrown from checkLabel. After calling checkLabel, the format of the label shall be correct, and shall not be considered illegal. The message of the thrown IllegalArgumentException is "Already visited label". It also indicates that the format is correct, but the state does not allow visiting a visisted label again.