File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -2748,27 +2748,28 @@ bool java_bytecode_convert_methodt::is_method_inherited(
27482748 {
27492749 return true ;
27502750 }
2751+
27512752 // methods with the default access modifier are only
27522753 // accessible within the same package.
2753-
2754- else if (access==ID_default)
2754+ if (access==ID_default)
27552755 {
27562756 const std::string &class_package=
27572757 java_class_to_package (id2string (classname));
27582758 const std::string &method_package=
27592759 java_class_to_package (id2string (resolved_call.get_class_identifier ()));
27602760 return method_package==class_package;
27612761 }
2762- else if (access==ID_private)
2762+
2763+ if (access==ID_private)
27632764 {
27642765 // This is somewhat contentious: previously this code would keep walking
27652766 // up the parent if it found a private function. But this isn't what Java
27662767 // appears to do. If a private method is found then that becomes the
27672768 // virtual signuate and blocks access to the parent class
27682769 return false ;
27692770 }
2770- else
2771- INVARIANT (false , " Unexpected access modifier." );
2771+
2772+ INVARIANT (false , " Unexpected access modifier." );
27722773 }
27732774
27742775 return false ;
You can’t perform that action at this time.
0 commit comments