readObject 或 writeObject 方法未被声明为 private 的 Serializable 类。
这些方法的可见性没有理由比 private 更高。
建议通过快速修复将相应的方法设为 private。
示例:
public class Test implements Serializable {
public void readObject(ObjectInputStream stream) {
/* ... */
}
}
在应用快速修复后:
public class Test implements Serializable {
private void readObject(ObjectInputStream stream) {
/* ... */
}
}