@@ -337,36 +337,38 @@ void java_bytecode_parsert::get_class_refs()
337
337
for (const auto &field : parse_tree.parsed_class .fields )
338
338
{
339
339
typet field_type;
340
- if (field.has_signature )
340
+ if (field.signature . has_value () )
341
341
{
342
342
field_type=java_type_from_string (
343
- field.signature ,
343
+ field.signature . value () ,
344
344
" java::" +id2string (parse_tree.parsed_class .name ));
345
345
}
346
346
else
347
347
field_type=java_type_from_string (field.descriptor );
348
+
348
349
get_class_refs_rec (field_type);
349
350
}
350
351
351
352
for (const auto &method : parse_tree.parsed_class .methods )
352
353
{
353
354
typet method_type;
354
- if (method.has_signature )
355
+ if (method.signature . has_value () )
355
356
{
356
357
method_type=java_type_from_string (
357
- method.signature ,
358
+ method.signature . value () ,
358
359
" java::" +id2string (parse_tree.parsed_class .name ));
359
360
}
360
361
else
361
362
method_type=java_type_from_string (method.descriptor );
363
+
362
364
get_class_refs_rec (method_type);
363
365
for (const auto &var : method.local_variable_table )
364
366
{
365
367
typet var_type;
366
- if (var.has_signature )
368
+ if (var.signature . has_value () )
367
369
{
368
370
var_type=java_type_from_string (
369
- var.signature ,
371
+ var.signature . value () ,
370
372
" java::" +id2string (parse_tree.parsed_class .name ));
371
373
}
372
374
else
@@ -973,7 +975,6 @@ void java_bytecode_parsert::rmethod_attribute(methodt &method)
973
975
else if (attribute_name==" Signature" )
974
976
{
975
977
u2 signature_index=read_u2 ();
976
- method.has_signature =true ;
977
978
method.signature =id2string (pool_entry (signature_index).s );
978
979
}
979
980
else if (attribute_name==" RuntimeInvisibleAnnotations" ||
@@ -995,7 +996,6 @@ void java_bytecode_parsert::rfield_attribute(fieldt &field)
995
996
if (attribute_name==" Signature" )
996
997
{
997
998
u2 signature_index=read_u2 ();
998
- field.has_signature =true ;
999
999
field.signature =id2string (pool_entry (signature_index).s );
1000
1000
}
1001
1001
else if (attribute_name==" RuntimeInvisibleAnnotations" ||
@@ -1352,7 +1352,6 @@ void java_bytecode_parsert::rclass_attribute(classt &parsed_class)
1352
1352
else if (attribute_name==" Signature" )
1353
1353
{
1354
1354
u2 signature_index=read_u2 ();
1355
- parsed_class.has_signature =true ;
1356
1355
parsed_class.signature =id2string (pool_entry (signature_index).s );
1357
1356
}
1358
1357
else if (attribute_name==" RuntimeInvisibleAnnotations" ||
@@ -1480,7 +1479,6 @@ void java_bytecode_parsert::parse_local_variable_type_table(methodt &method)
1480
1479
{
1481
1480
found=true ;
1482
1481
lvar.signature =id2string (pool_entry (signature_index).s );
1483
- lvar.has_signature =true ;
1484
1482
break ;
1485
1483
}
1486
1484
}
0 commit comments