-
Notifications
You must be signed in to change notification settings - Fork 465
Open
Labels
bugPotential bug in ProGuard.Potential bug in ProGuard.cant-reproducejavaobfuscationproguard-coreThe issue requires a change in ProGuardCOREThe issue requires a change in ProGuardCORE
Description
In my application I have a class hierarchy similar to the following one
public sealed interface Animal permits Mammal, Fish {}
public sealed interface Mammal permits Cat, Dog{}
public final class Fish implements Animal {}
public final class Cat implements Mammal {}
public final class Dog implements Mammal {}
class Main{
public static void main(String[] args){
new Dog();
new Cat();
new Fish();
}
}
When obfuscating with proguard, it changes the permitted subclasses of the Animal
class to [...] Animal permits Fish
. I'm suspecting because the Mammal
class is not used in my application directly. However, when I try to run the obfuscated application, I get the following error
java.lang.IncompatibleClassChangeError: class fj cannot extend sealed interface ff (java.lang.ClassLoader./.defineClass1./.-2)
Here, fj = Mammal
and ff = Animal
. So java cannot load the Mammal
class because it extends the Animal
class and is no longer part of the permitted subclasses.
I'm suspecting that there is a bug in proguard that shrinks the application too much so that it can no longer be run.
Metadata
Metadata
Assignees
Labels
bugPotential bug in ProGuard.Potential bug in ProGuard.cant-reproducejavaobfuscationproguard-coreThe issue requires a change in ProGuardCOREThe issue requires a change in ProGuardCORE