Skip to content

Commit 5350133

Browse files
Refactor inner class parsing.
1 parent 9ba55e2 commit 5350133

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

jbmc/src/java_bytecode/java_bytecode_parser.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -1612,19 +1612,16 @@ void java_bytecode_parsert::rinner_classes_attribute(
16121612
for(int i = 0; i < number_of_classes; i++)
16131613
{
16141614
u2 inner_class_info_index = read_u2();
1615-
UNUSED u2 outer_class_info_index = read_u2();
1615+
u2 outer_class_info_index = read_u2();
16161616
UNUSED u2 inner_name_index = read_u2();
16171617
u2 inner_class_access_flags = read_u2();
16181618

1619-
if(inner_class_info_index == 0)
1620-
continue;
1621-
16221619
std::string inner_class_info_name =
16231620
class_infot(pool_entry(inner_class_info_index))
16241621
.get_name(pool_entry_lambda);
1625-
bool is_private = inner_class_access_flags & ACC_PRIVATE;
1626-
bool is_public = inner_class_access_flags & ACC_PUBLIC;
1627-
bool is_protected = inner_class_access_flags & ACC_PROTECTED;
1622+
bool is_private = (inner_class_access_flags & ACC_PRIVATE) != 0;
1623+
bool is_public = (inner_class_access_flags & ACC_PUBLIC) != 0;
1624+
bool is_protected = (inner_class_access_flags & ACC_PROTECTED) != 0;
16281625

16291626
// If the original parsed class name matches the inner class name,
16301627
// the parsed class is an inner class, so overwrite the parsed class'

0 commit comments

Comments
 (0)