Files
openide/java/java-impl/resources/inspectionDescriptions/NonSerializableObjectBoundToHttpSession.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
817 B
HTML

<html>
<body>
Reports objects of classes not implementing <code>java.io.Serializable</code> used as arguments to
<code>javax.servlet.http.HttpSession.setAttribute()</code> or
<code>javax.servlet.http.HttpSession.putValue()</code>.
<p>
Such objects will not be serialized if the <code>HttpSession</code> is passivated or migrated,
and may result in difficult-to-diagnose bugs.
</p>
<p>
This inspection assumes objects of the types <code>java.util.Collection</code> and
<code>java.util.Map</code> to be <code>Serializable</code>,
unless type parameters are non-<code>Serializable</code>.
</p>
<p><b>Example:</b></p>
<pre><code>
void foo(HttpSession session) {
session.setAttribute("foo", new NonSerializable());
}
static class NonSerializable {}
</code></pre>
<!-- tooltip end -->
</body>
</html>