...
| Code Block | ||
|---|---|---|
| ||
private void readObject(final ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
}
|
Exceptions
*SER09-EX0:* The {{Wiki Markup readObject()}} method may invoke the overridable methods {{defaultReadObject()}} and {{readFields()}} in class {{java.io.ObjectInputStream}} \[ [SCG 2009|AA. References#SCG 09]\].
Risk Assessment
Invoking overridable methods from the readObject() method can lead to initialization errors.
...
Secure Coding Guidelines for the Java Programming Language, Version 3.0 | Guideline 4-4. Prevent constructors from calling methods that can be overridden |
Bibliography
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1058fa6c-52a5-4e2b-b3e3-df412133d786"><ac:plain-text-body><![CDATA [ [[API 2006AA. References#API 06] ] |
| ]]></ac:plain-text-body></ac:structured-macro> | <ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6c247f9d-b0e4-4f72-8adf-712507b98caf"><ac:plain-text-body><![CDATA[ |
[ [Bloch 2008AA. References#Bloch 08] ] | Item 17. Design and document for inheritance or else prohibit it ]]></ac:plain-text-body></ac:structured-macro> |
...