JonnyBoy
JonnyBoy

Reputation: 1567

How to not obfuscate a method with list argument

I have a class that looks like this:

package com.hi

class A {
    void doSomething(java.util.List<SomeClass> list) {
    }
}

Then in my proguard.cfg I tried this:

-keep class com.hi.A {
    void doSomething(java.util.List<com.hi.SomeClass>);
}

But that fails proguard with:

[proguard] Note: the configuration refers to the unknown class 'java.util.List<com.hi.SomeClass>'

I couldn't find anywhere in the proguard docs about using template arguments. Has anyone been able to keep this kind of method?

Upvotes: 0

Views: 529

Answers (1)

JonnyBoy
JonnyBoy

Reputation: 1567

I solved it this way:

-keep class com.hi.A {
    void doSomething(java.util.List);
}

Upvotes: 2

Related Questions