#440 access modifier not honored

v4.7
closed-invalid
5
2012-02-25
2012-02-25
voodoosoft
No

When trying to keep methods with the following command:
-keepclassmembers public class * {
public void on*(...);
}

Not only public methods named on* are kept but also protected methods.
Java 7.

Discussion

  • Eric Lafortune

    Eric Lafortune - 2012-02-25
    • assigned_to: nobody --> lafortune
    • status: open --> open-works-for-me
     
  • Eric Lafortune

    Eric Lafortune - 2012-02-25

    It works for me on a simple test. The method is probably being kept for other reasons -- you should try the option -whyareyoukeeping. Otherwise, if you have a simple test case, I'll look into it.

     
  • voodoosoft

    voodoosoft - 2012-02-25

    "whyareyoukeeping" did help.
    The protected method is defined in an ancestor class. In one of its descendants its modifier was changed to public for no good reason. That caused the method to show up in the mapping file.
    Sorry for false alarm.

     
  • Eric Lafortune

    Eric Lafortune - 2012-02-25
    • status: open-works-for-me --> closed-invalid
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks