You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package cases.enums;
public enum JavaEnum {
A {
@Override
public void publicAbstractMethod() {
}
@Override
protected void protectedAbstractMethod() {
}
@Override
void packagePrivateAbstractMethod() {
}
};
public abstract void publicAbstractMethod();
protected abstract void protectedAbstractMethod();
abstract void packagePrivateAbstractMethod();
}
Expected:
public abstract class cases/enums/JavaEnum : java/lang/Enum {
public static final field A Lcases/enums/JavaEnum;
public abstract fun publicAbstractMethod ()V
public static fun valueOf (Ljava/lang/String;)Lcases/enums/JavaEnum;
public static fun values ()[Lcases/enums/JavaEnum;
}
Actual:
public abstract class cases/enums/JavaEnum : java/lang/Enum {
public static final field A Lcases/enums/JavaEnum;
protected abstract fun protectedAbstractMethod ()V
public abstract fun publicAbstractMethod ()V
public static fun valueOf (Ljava/lang/String;)Lcases/enums/JavaEnum;
public static fun values ()[Lcases/enums/JavaEnum;
}
The text was updated successfully, but these errors were encountered:
dovchinnikov
changed the title
protected abstract method of enum should not be includedprotected method of enum should not be included
Dec 6, 2023
Well, JVMS doesn't stop us from having a class extending j.l.Enum, so one theoretically may have a "enum" with non-final protected methods that could be overridden by some other class on the classpath. 😢
What problem you're trying to solve? Do you have a bunch of enums that change constantly?
I'm trying to minimize the amount of entries in the dump.
Do you have a bunch of enums that change constantly?
Not really. But the same argument can be used for any other member which is hidden from dumps by BCV and which technically constitutes API from JVMS perspective, right? If the argument applies here, then it should be applicable there, and if it's not applicable there, then it should not be considered here.
Expected:
Actual:
The text was updated successfully, but these errors were encountered: