rspec/rules/S3057/java/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
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.
2023-05-25 14:18:12 +02:00

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[]