Menu

#5 Problems with native methods

closed-fixed
None
5
2002-11-03
2002-09-09
No

I'm using the following option to preserve native methods from
obfuscation:

-keepclassmembernames class * {

native <methods>;
}

But this is not enough, because
the preserved class name is required, too.

BTW, native
methods should *always* be kept, because it just does not make
sense to obfuscate them.

Related

Bugs: #498
Bugs: #607
Bugs: #721

Discussion

  • Eric Lafortune

    Eric Lafortune - 2002-09-09

    Logged In: YES
    user_id=555208

    You're right, the class names have to be preserved as well.
    I've always dealt with classes that weren't renamed, so it
    had slipped my attention. I'll update the example that
    discusses native methods.

    Native methods should always be kept, unless the user is
    willing to obfuscate his native code manually, based on
    ProGuard's obfuscation map. In general, I'd like to leave
    all options open to the user. In this case, there isn't a
    single directive you can specify; you'll have to explicitly
    list your classes with native methods. If the configuration
    becomes too cumbersome, I might consider hard-coding it. Of
    course, everyone is free to change his copy of the source
    code to suit his personal tastes. :)

    Eric.

     
  • Eric Lafortune

    Eric Lafortune - 2002-09-09
    • assigned_to: nobody --> lafortune
     
  • Eric Lafortune

    Eric Lafortune - 2002-11-03
    • status: open --> open-fixed
     
  • Eric Lafortune

    Eric Lafortune - 2002-11-03
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB