Skip to content

Commit 12f049e

Browse files
thk123Matthias Güdemann
thk123
authored and
Matthias Güdemann
committed
Added extra information to the warnings to differentaite the different cases
1 parent 1db68a5 commit 12f049e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

src/java_bytecode/java_bytecode_parser.cpp

+10-4
Original file line numberDiff line numberDiff line change
@@ -1880,9 +1880,12 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
18801880
u2 skipped_argument = u2_values[i];
18811881
recognized &= pool_entry(skipped_argument).tag == CONSTANT_Integer;
18821882
}
1883+
18831884
if(!recognized)
18841885
{
1885-
debug() << "format of BootstrapMethods entry not recognized" << eom;
1886+
debug() << "format of BootstrapMethods entry not recognized: extra "
1887+
"arguments of wrong type"
1888+
<< eom;
18861889
store_unknown_method_handle(
18871890
parsed_class, bootstrap_method_index, std::move(u2_values));
18881891
continue;
@@ -1898,7 +1901,9 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
18981901
method_handle_argument.tag == CONSTANT_MethodHandle &&
18991902
method_type_argument.tag == CONSTANT_MethodType))
19001903
{
1901-
debug() << "format of BootstrapMethods entry not recognized" << eom;
1904+
debug() << "format of BootstrapMethods entry not recognized: arguments "
1905+
"wrong type"
1906+
<< eom;
19021907
store_unknown_method_handle(
19031908
parsed_class, bootstrap_method_index, std::move(u2_values));
19041909
continue;
@@ -1910,7 +1915,9 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
19101915

19111916
if(!lambda_method_handle.has_value())
19121917
{
1913-
debug() << "format of BootstrapMethods entry not recognized" << eom;
1918+
debug() << "format of BootstrapMethods entry not recognized: method "
1919+
"handle not recognised"
1920+
<< eom;
19141921
store_unknown_method_handle(
19151922
parsed_class, bootstrap_method_index, std::move(u2_values));
19161923
continue;
@@ -1936,7 +1943,6 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
19361943
<< eom;
19371944
parsed_class.lambda_method_handle_map[{parsed_class.name, bootstrap_method_index}] =
19381945
*lambda_method_handle;
1939-
19401946
}
19411947
}
19421948

0 commit comments

Comments
 (0)