mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
25 lines
849 B
HTML
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> |