We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 671193c commit b2dd3a2Copy full SHA for b2dd3a2
src/java_bytecode/java_object_factory.cpp
@@ -418,7 +418,17 @@ void java_object_factoryt::gen_nondet_init(
418
create_dynamic_objects,
419
NO_UPDATE_IN_PLACE);
420
421
- if(assume_non_null)
+ // Determine whether the pointer can be null.
422
+ // In particular the array field of a String should not be null.
423
+ bool not_null=
424
+ assume_non_null ||
425
+ ((class_identifier=="java.lang.String" ||
426
+ class_identifier=="java.lang.StringBuilder" ||
427
+ class_identifier=="java.lang.StringBuffer" ||
428
+ class_identifier=="java.lang.CharSequence") &&
429
+ subtype.id()==ID_array);
430
+
431
+ if(not_null)
432
{
433
// Add the following code to assignments:
434
// <expr> = <aoe>;
0 commit comments