File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -544,8 +544,7 @@ static code_with_references_listt assign_struct_components_from_json(
544544 {
545545 const auto member_json = [&]() -> jsont {
546546 if (
547- is_primitive_wrapper_type_name (id2string (
548- strip_java_namespace_prefix (java_class_type.get_name ()))) &&
547+ is_primitive_wrapper_type_id (java_class_type.get_name ()) &&
549548 id2string (component_name) == " value" )
550549 {
551550 return get_untyped_primitive (json);
Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ get_java_primitive_type_info(const typet &maybe_primitive_type)
104104 return found == type_info_by_primitive_type.end () ? nullptr : &found->second ;
105105}
106106
107+ bool is_primitive_wrapper_type_id (const irep_idt &id)
108+ {
109+ return get_boxed_type_info_by_name (id) != nullptr ;
110+ }
111+
107112bool is_primitive_wrapper_type_name (const std::string &type_name)
108113{
109114 static const std::unordered_set<std::string> primitive_wrapper_type_names = {
Original file line number Diff line number Diff line change @@ -62,8 +62,12 @@ struct java_boxed_type_infot
6262const java_boxed_type_infot *
6363get_boxed_type_info_by_name (const irep_idt &type_name);
6464
65+ // / Returns true iff the argument is the symbol-table identifier of a Java
66+ // / primitive wrapper type (for example, java::java.lang.Byte)
67+ bool is_primitive_wrapper_type_id (const irep_idt &id);
68+
6569// / Returns true iff the argument is the fully qualified name of a Java
66- // / primitive wrapper type.
70+ // / primitive wrapper type (for example, java.lang.Byte)
6771bool is_primitive_wrapper_type_name (const std::string &type_name);
6872
6973void generate_class_stub (
You can’t perform that action at this time.
0 commit comments