I am not sure if this is the right place but this could be a duplicate of another issue that i filed on the dcevm repository.
That is the link to the issue issue for reference
https://github.com/dcevm/dcevm/issues/178
The following code always fails when any part of the class is changed even if no changes happen to the actual interface.
import java.util.HashMap;
public class TestDCEVM {
public static class Context {
}
@FunctionalInterface
interface Loader {
void load(Context context);
static Loader DEFAULT = context -> {
System.out.println("context");
};
}
public static void main(String[] args) {
while (true) {
HashMap map = new HashMap();
map.put("loader", Loader.DEFAULT);
// The line below will cause a ClassCastException any time the class
// is changed.
Loader loader = (Loader) map.get("loader");
loader.load(new Context());
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
break;
}
}
}
}
This is running with the latest build both in jdk 11 and jdk 8
The error message is Exception in thread "main" java.lang.ClassCastException: TestDCEVM$Loader$$Lambda$1/902919927 cannot be cast to TestDCEVM$Loader
at TestDCEVM.main(TestDCEVM.java:24)
Refactoring the Loader into its own file resolves the issue.
I am not sure if this is the right place but this could be a duplicate of another issue that i filed on the dcevm repository. That is the link to the issue issue for reference https://github.com/dcevm/dcevm/issues/178
The following code always fails when any part of the class is changed even if no changes happen to the actual interface.
This is running with the latest build both in jdk 11 and jdk 8
The error message is Exception in thread "main" java.lang.ClassCastException: TestDCEVM$Loader$$Lambda$1/902919927 cannot be cast to TestDCEVM$Loader at TestDCEVM.main(TestDCEVM.java:24)
Refactoring the Loader into its own file resolves the issue.