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(
2748
2748
{
2749
2749
return true ;
2750
2750
}
2751
+
2751
2752
// methods with the default access modifier are only
2752
2753
// accessible within the same package.
2753
-
2754
- else if (access==ID_default)
2754
+ if (access==ID_default)
2755
2755
{
2756
2756
const std::string &class_package=
2757
2757
java_class_to_package (id2string (classname));
2758
2758
const std::string &method_package=
2759
2759
java_class_to_package (id2string (resolved_call.get_class_identifier ()));
2760
2760
return method_package==class_package;
2761
2761
}
2762
- else if (access==ID_private)
2762
+
2763
+ if (access==ID_private)
2763
2764
{
2764
2765
// This is somewhat contentious: previously this code would keep walking
2765
2766
// up the parent if it found a private function. But this isn't what Java
2766
2767
// appears to do. If a private method is found then that becomes the
2767
2768
// virtual signuate and blocks access to the parent class
2768
2769
return false ;
2769
2770
}
2770
- else
2771
- INVARIANT (false , " Unexpected access modifier." );
2771
+
2772
+ INVARIANT (false , " Unexpected access modifier." );
2772
2773
}
2773
2774
2774
2775
return false ;
You can’t perform that action at this time.
0 commit comments