...
Code Block |
---|
|
private void readObject(final ObjectInputStream stream) throws
IOException, ClassNotFoundException {
overridableMethod();
stream.defaultReadObject();
}
public void overridableMethod() {
// ...
}
|
Compliant Solution
This compliant solution removes the call to the overridable method. If this cannot be done, ensure that the overridable method is declared private
or final
.
Code Block |
---|
|
private void readObject(final ObjectInputStream stream) throws
IOException, ClassNotFoundException {
stream.defaultReadObject();
}
|
...