
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
38 lines
706 B
Plaintext
38 lines
706 B
Plaintext
== Why is this an issue?
|
|
|
|
A serialVersionUID field is required in a ``++Serializable++`` class. In a non-``++Serializable++``, it's just confusing.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,java]
|
|
----
|
|
public class MyClass {
|
|
private static final long serialVersionUID = -1L; // Noncompliant
|
|
}
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Remove this serialVersionUID.
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 12 Jun 2015, 15:16:42 Ann Campbell wrote:
|
|
CodePro: Non-serializable Class Declares serialVersionUID
|
|
|
|
=== on 15 Jun 2015, 20:21:46 Nicolas Peru wrote:
|
|
Looks good
|
|
|
|
endif::env-github,rspecator-view[]
|