Skip to content

Commit 36ed947

Browse files
Replace assert by invariant
1 parent 036f1b1 commit 36ed947

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

jbmc/src/java_bytecode/java_bytecode_convert_method.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,10 +1068,9 @@ codet java_bytecode_convert_methodt::convert_instructions(
10681068
if(i_it->statement=="jsr" ||
10691069
i_it->statement=="jsr_w")
10701070
{
1071-
assert(
1072-
next!=instructions.end() &&
1073-
"jsr without valid return address?");
10741071
auto next = std::next(i_it);
1072+
DATA_INVARIANT(
1073+
next != instructions.end(), "jsr should have valid return address");
10751074
targets.insert(next->address);
10761075
jsr_ret_targets.push_back(next->address);
10771076
}

0 commit comments

Comments
 (0)