@@ -803,12 +803,11 @@ void java_object_factoryt::gen_nondet_struct_init(
803
803
java_string_library_preprocesst::implements_java_char_sequence (struct_type);
804
804
const bool has_length_and_data =
805
805
struct_type.has_component (" length" ) && struct_type.has_component (" data" );
806
- const bool skip_special_string_fields =
807
- is_char_sequence && has_length_and_data;
806
+ const bool is_string_type = is_char_sequence && has_length_and_data;
808
807
const bool has_string_input_values =
809
808
!object_factory_parameters.string_input_values .empty ();
810
809
811
- if (skip_special_string_fields && has_string_input_values && !skip_classid)
810
+ if (is_string_type && has_string_input_values && !skip_classid)
812
811
{ // We're dealing with a string and we should set fixed input values.
813
812
// We create a switch statement where each case is an assignment
814
813
// of one of the fixed input strings to the input variable in question
@@ -825,7 +824,7 @@ void java_object_factoryt::gen_nondet_struct_init(
825
824
else if (
826
825
(!is_sub && !skip_classid &&
827
826
update_in_place != update_in_placet::MUST_UPDATE_IN_PLACE) ||
828
- skip_special_string_fields )
827
+ is_string_type )
829
828
{
830
829
// Add an initial all-zero write. Most of the fields of this will be
831
830
// overwritten, but it helps to have a whole-structure write that analysis
@@ -842,7 +841,7 @@ void java_object_factoryt::gen_nondet_struct_init(
842
841
// If the initialised type is a special-cased String type (one with length
843
842
// and data fields introduced by string-library preprocessing), initialise
844
843
// those fields with nondet values
845
- if (skip_special_string_fields )
844
+ if (is_string_type )
846
845
{ // We're dealing with a string
847
846
initialize_nondet_string_fields (
848
847
to_struct_expr (*initial_object),
@@ -882,7 +881,7 @@ void java_object_factoryt::gen_nondet_struct_init(
882
881
code.add_source_location () = location;
883
882
assignments.add (code);
884
883
}
885
- else if (skip_special_string_fields && (name == " length" || name == " data" ))
884
+ else if (is_string_type && (name == " length" || name == " data" ))
886
885
{
887
886
// In this case these were set up above.
888
887
continue ;
0 commit comments