I am using proguard 7.4.2. I used it successfully about a month ago but today when I ran it, it gave me a jar that gives a runtime error:
Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'b' for bean class [xxx.xxx.a.b] conflicts with existing, non-compatible bean definition of same name and class [xxx.xxx.b]
I inspected the code and saw this:
package xxx.xxx;
import xxx.xxx.a.b;
import org.springframework.stereotype.Component;
@Component
public class b {
private final b dP;
public b(b paramb) {
this.dP = paramb;
}
}
This code will not even compile. What does
private final b dP
refer to? Is it a self-reference to xxx.xxx.b
or a reference to xxx.xxx.a.b
? Its an ambiguous reference. Earlier when I ran proguard I had gotten this:
package xxx.xxx;
import xxx.xxx.a.i;
import org.springframework.stereotype.Component;
@Component
public class b {
private final i dP;
public b(i paramb) {
this.dP = paramb;
}
}
I haven’t changed the proguard config so not sure why its behaving differently this time. Any idea how I can fix this except using keep class? I do want the class to be obfuscated just that it should not mix up the names.
related (unresolved): I'm using proguard. I wanna know an option that keeps different class names for different packages