Unnecessary change of member access level
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
In the proguard.classfile.editor.AccessFixer.MyAccessFixer.visitProgramMember() there is a condition, which could never be met:
int requiredAccessLevel =
programClass.equals(referencingClass) ? AccessUtil.PRIVATE :
inSamePackage(programClass, referencingClass) ? AccessUtil.PACKAGE_VISIBLE :
**programClass.extends_(referencingClass) &&
referencingClass.extends_(programClass)** ? AccessUtil.PROTECTED :
AccessUtil.PUBLIC;
I think ("A extends B" AND "B extends A") is never possible. Maybe an OR was intended.
I stumbled over this, when I inspected some of the obfuscated class files, were the access level of some members changed to PUBLIC.
Thanks for your report. You're right; that condition doesn't make much sense. It was the result of some refactoring. The intention is more complex, involving the class in the method invocation and the class that actually contains the method . I'll fix it for the upcoming ProGuard 5.3.