Skip to content

Commit 04e55be

Browse files
author
svorenova
committed
Reverting method descriptor loading
The signature and the descriptor of a method do not match up (see java spec: The signature and descriptor (§4.3.3) of a given method or constructor may not correspond exactly, due to compiler-generated artifacts. In particular, the number of TypeSignatures that encode formal arguments in MethodTypeSignature may be less than the number of ParameterDescriptors in MethodDescriptor.) Reverting this to descriptor solves the current problem with passing tests.
1 parent 2f7925d commit 04e55be

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

src/java_bytecode/java_bytecode_convert_method.cpp

+1-14
Original file line numberDiff line numberDiff line change
@@ -263,20 +263,7 @@ void java_bytecode_convert_method_lazy(
263263
symbol_tablet &symbol_table)
264264
{
265265
symbolt method_symbol;
266-
typet member_type;
267-
if(m.signature.has_value())
268-
{
269-
#ifdef DEBUG
270-
std::cout << "method " << m.name
271-
<< " has signature " << m.signature.value() << "\n";
272-
#endif
273-
member_type=java_type_from_string(
274-
m.signature.value(),
275-
id2string(class_symbol.name));
276-
INVARIANT(member_type.id()==ID_code, "Must be code type");
277-
}
278-
else
279-
member_type=java_type_from_string(m.descriptor);
266+
typet member_type=java_type_from_string(m.descriptor);
280267

281268
method_symbol.name=method_identifier;
282269
method_symbol.base_name=m.base_name;

0 commit comments

Comments
 (0)