ifnonnull : jump if non-null : index : visitJumpInsn()

Description
ifnonnull pops the top object reference off the operand stack. If the object reference is not the special null reference, execution branches to the address (pc + branchoffset), where pc is the address of the ifnonnull opcode in the bytecode and branchoffset is a 16-bit signed integer parameter following the ifnonnull opcode in the bytecode. If the object reference on the stack is null, execution continues at the next instruction.

If you are using Jasmin, branchoffset is computed for you from the address of <label>.
Example
    aload_1         ; push the object reference in local variable 1 onto the stack
    ifnonnull Label ; if local variable isn't null, jump to Label
    return          ; return if local variable 1 is null
Label:
    ; execution continues here if local variable 1 is something other than null ...
Notes
Addresses are measured in bytes from the start of the bytecode (i.e. address 0 is the first byte in the bytecode of the currently executing method).
See also
ifnull ifeq ifle iflt ifne ifgt ifge
Stack
Before After
objectref ...
... ...
Bytecode
Type Description
u1 ifnonnull opcode = 0xC7 (199)
s2 branchoffset