Files
openide/plugins/kotlin/code-insight/descriptions/resources-en/inspectionDescriptions/JavaIoSerializableObjectMustHaveReadResolve.html
Nikita Bobko 96f33d3f84 Implement JavaIoSerializableObjectMustHaveReadResolve inspection
^KTIJ-23868 Fixed
Review: https://jetbrains.team/p/ij/reviews/107981

GitOrigin-RevId: 2075b68da44cd8aaead447cf3353262f0db00588
2023-06-06 15:49:21 +00:00

22 lines
610 B
HTML

<html>
<body>
<p>
Reports <code>object</code>s (<code>data object</code> including) that implement <code>java.io.Serializable</code> but don't implement
<a href="https://docs.oracle.com/en/java/javase/11/docs/specs/serialization/input.html#the-readresolve-method">readResolve</a>
</p>
<p><b>Example:</b></p>
<pre><code>
import java.io.Serializable
object Foo : Serializable
</code></pre>
<p>The quick fix implements <code>readResolve</code> method:</p>
<pre><code>
import java.io.Serializable
object Foo : Serializable {
private fun readResolve() = Foo
}
</code></pre>
</body>
</html>