File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -543,9 +543,7 @@ static code_with_references_listt assign_struct_components_from_json(
543
543
else // component is class field (pointer to struct)
544
544
{
545
545
const auto member_json = [&]() -> jsont {
546
- if (
547
- is_primitive_wrapper_type_name (id2string (
548
- strip_java_namespace_prefix (java_class_type.get_name ()))) &&
546
+ if (is_primitive_wrapper_type_id (java_class_type.get_name ()) &&
549
547
id2string (component_name) == " value" )
550
548
{
551
549
return get_untyped_primitive (json);
Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ get_java_primitive_type_info(const typet &maybe_primitive_type)
104
104
return found == type_info_by_primitive_type.end () ? nullptr : &found->second ;
105
105
}
106
106
107
+ bool is_primitive_wrapper_type_id (const irep_idt &id) {
108
+ return get_boxed_type_info_by_name (id) != nullptr ;
109
+ }
110
+
107
111
bool is_primitive_wrapper_type_name (const std::string &type_name)
108
112
{
109
113
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
62
62
const java_boxed_type_infot *
63
63
get_boxed_type_info_by_name (const irep_idt &type_name);
64
64
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
+
65
69
// / 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)
67
71
bool is_primitive_wrapper_type_name (const std::string &type_name);
68
72
69
73
void generate_class_stub (
You can’t perform that action at this time.
0 commit comments