mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
24 lines
645 B
HTML
24 lines
645 B
HTML
<html>
|
|
<body>
|
|
Reports <code>Serializable</code> classes whose closest non-serializable ancestor doesn't have
|
|
a no-argument constructor. Such classes cannot be deserialized and will fail with an <code>InvalidClassException</code>.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Ancestor {
|
|
private String name;
|
|
Ancestor(String name) {
|
|
this.name = name;
|
|
}
|
|
}
|
|
|
|
// warning on this class because the superclass is not
|
|
// serializable, and its constructor takes arguments
|
|
class Descendant extends Ancestor implements Serializable {
|
|
Descendant() {
|
|
super("Bob");
|
|
}
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |