这是代码(简化):
public abstract class PageBase implements Serializable {
private static final long serialVersionUID = -31905358958878336L;
}
public abstract class ListPage extends PageBase {
public Controller getController() {
// Controller is a class
// that implements Serializable and does have an def. constr.
return new Controller() {
@Override
public void someMethod() {
// DoSomething
}
};
}
}
public class ProjectList extends ListPage {
}
并通过反序列化它抛出:
java.io.InvalidClassException: my.pkg.page.ListPage$1; no valid constructor
反序列化发生在 IBM JSF-Code 的某个地方。
有任何想法吗?谢谢!