Skip to content

Commit 2a5c280

Browse files
author
thk123
committed
Correctly parse multiple input parameters for functions
When there is a function on a generic type whose params are inner classes we would wrongly parse only up to the inner class dot for the name. This resulted in wrong parameters causing us to fall back on the descriptor unnecessarily. Instead we should find the semi-colon that matches the L for each parameter before moving on to the next parameter.
1 parent 35d974f commit 2a5c280

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/java_bytecode/java_types.cpp

+1-8
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,7 @@ typet java_type_from_string(
437437
// parameter is an object type or instantiated generic type
438438
if(src[i]=='L')
439439
{
440-
size_t generic_open=src.find('<', i);
441-
size_t end_pos=src.find(';', i);
442-
// generic signature
443-
if(generic_open!=std::string::npos && generic_open<end_pos)
444-
// point to ';' immediately after the closing '>'
445-
i=find_closing_delimiter(src, generic_open, '<', '>')+1;
446-
else
447-
i=src.find(';', i); // ends on ;
440+
i = find_closing_semi_colon_for_reference_type(src, i);
448441
break;
449442
}
450443

0 commit comments

Comments
 (0)