We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5b5a4d2 + b2dd3a2 commit 00bb9b1Copy full SHA for 00bb9b1
src/java_bytecode/java_object_factory.cpp
@@ -509,7 +509,17 @@ void java_object_factoryt::gen_nondet_init(
509
create_dynamic_objects,
510
NO_UPDATE_IN_PLACE);
511
512
- if(assume_non_null)
+ // Determine whether the pointer can be null.
513
+ // In particular the array field of a String should not be null.
514
+ bool not_null=
515
+ assume_non_null ||
516
+ ((class_identifier=="java.lang.String" ||
517
+ class_identifier=="java.lang.StringBuilder" ||
518
+ class_identifier=="java.lang.StringBuffer" ||
519
+ class_identifier=="java.lang.CharSequence") &&
520
+ subtype.id()==ID_array);
521
+
522
+ if(not_null)
523
{
524
// Add the following code to assignments:
525
// <expr> = <aoe>;
0 commit comments