开发者

How to keeping abstract class in Proguard, (JedisPubSub)

开发者 https://www.devze.com 2022-12-07 17:23 出处:网络
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.

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

精彩评论

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