ImplicitExceptions
Marc R. Hoffmann edited this page Dec 16, 2016
·
3 revisions
The following opcodes might throw Excpetions according to the JVM Spec.
Opcode | Possible Exceptions |
---|---|
aaload |
NullPointerException , ArrayIndexOutOfBoundsException
|
aastore |
NullPointerException , ArrayIndexOutOfBoundsException , ArrayStoreException
|
anewarray |
NegativeArraySizeException |
areturn |
IllegalMonitorStateException |
arraylength |
NullPointerException |
athrow |
NullPointerException , IllegalMonitorStateException
|
baload |
NullPointerException , ArrayIndexOutOfBoundsException
|
bastore |
NullPointerException , ArrayIndexOutOfBoundsException
|
caload |
NullPointerException , ArrayIndexOutOfBoundsException
|
castore |
NullPointerException , ArrayIndexOutOfBoundsException
|
checkcast |
ClassCastException |
daload |
NullPointerException , ArrayIndexOutOfBoundsException
|
dastore |
NullPointerException , ArrayIndexOutOfBoundsException
|
dreturn |
IllegalMonitorStateException |
faload |
NullPointerException , ArrayIndexOutOfBoundsException
|
fastore |
NullPointerException , ArrayIndexOutOfBoundsException
|
freturn |
IllegalMonitorStateException |
getfield |
NullPointerException |
iaload |
NullPointerException , ArrayIndexOutOfBoundsException
|
iastore |
NullPointerException , ArrayIndexOutOfBoundsException
|
idiv |
ArithmeticException |
invokedynamic |
any |
invokeinterface |
any |
invokespecial |
any |
invokestatic |
any |
invokevirtual |
any |
irem |
ArithmeticException |
ireturn |
IllegalMonitorStateException |
laload |
NullPointerException , ArrayIndexOutOfBoundsException
|
lastore |
NullPointerException , ArrayIndexOutOfBoundsException
|
ldiv |
ArithmeticException |
lrem |
ArithmeticException |
lreturn |
IllegalMonitorStateException |
monitorenter |
NullPointerException |
monitorexit |
NullPointerException , IllegalMonitorStateException
|
multianewarray |
NegativeArraySizeException |
newarray |
NegativeArraySizeException |
putfield |
NullPointerException |
return |
IllegalMonitorStateException |
saload |
NullPointerException , ArrayIndexOutOfBoundsException
|
sastore |
NullPointerException , ArrayIndexOutOfBoundsException
|