Skip to content

Commit 7cbe566

Browse files
Merge pull request #827 from owen-jones-diffblue/bugfix/java-parameter-declarations
Refactor java object factory
2 parents 3fddf20 + 17db86d commit 7cbe566

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

src/java_bytecode/java_object_factory.cpp

+4-11
Original file line numberDiff line numberDiff line change
@@ -459,19 +459,12 @@ void java_object_factoryt::gen_nondet_init(
459459
}
460460
else
461461
{
462-
code_assignt assign;
463-
assign.lhs()=expr;
462+
exprt rhs=type.id()==ID_c_bool?
463+
get_nondet_bool(type):
464+
side_effect_expr_nondett(type);
465+
code_assignt assign(expr, rhs);
464466
assign.add_source_location()=loc;
465467

466-
if(type.id()==ID_c_bool)
467-
{
468-
assign.rhs()=get_nondet_bool(type);
469-
}
470-
else
471-
{
472-
assign.rhs()=side_effect_expr_nondett(type);
473-
}
474-
475468
init_code.copy_to_operands(assign);
476469
}
477470
}

0 commit comments

Comments
 (0)