Files
openide/java/java-impl/resources/inspectionDescriptions/TransientFieldNotInitialized.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

25 lines
849 B
HTML

<html>
<body>
Reports <code>transient</code> fields that
are initialized during normal object construction, but whose class does not have a
<code>readObject</code> method.
<p>
As <code>transient</code> fields are not serialized they need
to be initialized separately in a <code>readObject()</code> method
during deserialization.
</p>
<p>
Any <code>transient</code> fields that
are not initialized during normal object construction are considered to use the default
initialization and are not reported by this inspection.
</p>
<p><b>Example:</b></p>
<pre><code>
class Person implements Serializable {
transient String name = "Default"; //warning, can actually be a null after deserialization
transient String surname; //null is considered the default value and not reported
}
</code></pre>
<!-- tooltip end -->
</body>
</html>