File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -587,9 +587,8 @@ void java_bytecode_convert_methodt::convert(
587
587
method_symbol.location =m.source_location ;
588
588
method_symbol.location .set_function (method_identifier);
589
589
590
- std::vector<irept> &exceptions_list = method_type.throws_exceptions ();
591
590
for (const auto &exception_name : m.throws_exception_table )
592
- exceptions_list. push_back (irept (exception_name));
591
+ method_type. add_throws_exceptions (irept (exception_name));
593
592
594
593
const std::string signature_string = pretty_signature (method_type);
595
594
Original file line number Diff line number Diff line change @@ -245,14 +245,17 @@ inline bool can_cast_type<java_class_typet>(const typet &type)
245
245
class java_method_typet : public code_typet
246
246
{
247
247
public:
248
- const std::vector<irept> & throws_exceptions () const
248
+ const std::vector<irep_idt> throws_exceptions () const
249
249
{
250
- return find (ID_exceptions_thrown_list).get_sub ();
250
+ std::vector<irep_idt> exceptions;
251
+ for (const auto &e : find (ID_exceptions_thrown_list).get_sub ())
252
+ exceptions.push_back (e.id ());
253
+ return exceptions;
251
254
}
252
255
253
- std::vector<irept> & throws_exceptions ( )
256
+ void add_throws_exceptions (irept exception )
254
257
{
255
- return add (ID_exceptions_thrown_list).get_sub ();
258
+ add (ID_exceptions_thrown_list).get_sub (). push_back (exception );
256
259
}
257
260
};
258
261
You can’t perform that action at this time.
0 commit comments