Skip to content

Commit

Permalink
Removed impossible condition
Browse files Browse the repository at this point in the history
Either an optional was returned or a correct lamdba so no need to handle
the third case. Added an invariant to catch the case this changes.
  • Loading branch information
thk123 authored and Matthias Güdemann committed Mar 13, 2018
1 parent 9749d5a commit 4bb98f0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/java_bytecode/java_bytecode_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1910,15 +1910,10 @@ void java_bytecode_parsert::read_bootstrapmethods_entry(classt &parsed_class)
continue;
}

if(
// If parse_method_handle can't parse the lambda method, it should return {}
POSTCONDITION(
lambda_method_handle->handle_type !=
method_handle_typet::LAMBDA_METHOD_HANDLE)
{
lambda_method_handle->u2_values = std::move(u2_values);
error() << "ERROR: could not parse lambda function method handle"
<< eom;
continue;
}
method_handle_typet::LAMBDA_METHOD_HANDLE);

lambda_method_handle->interface_type =
pool_entry(interface_type_argument.ref1).s;
Expand Down

0 comments on commit 4bb98f0

Please sign in to comment.