开发者

How to keeping abstract class in Proguard, (JedisPubSub)

Currently, I try obfuscated java code use the Proguard

In the existing code, code was implemented inside the subscribe, but after obfuscation, the codes disappear.

origin source
======================
Jedis jedis = new Jedis("test_host", 9999);
jedis.subscribe(new JedisPubSub() {
    @Override
    public void onMessage(String channel, String message) {
        // do something job ..
        System.out.println(String.format("channel : %s, message : %s", channel, message));
    }
},"test channel");
obfuscation after
======================
this.c.subscribe((JedisPubSub)new Object(this, jsonParser), new String[] { "test channel" });

I tried changing Proguard options.

-keep public class redis.clients.jedis.JedisPubSub
-keep, allowobfu开发者_运维问答scation class redis.clients.jedis.JedisPubSub
etc ....

How can i keep origin format ??

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜