
When an include is not surrounded by empty lines, its content is inlined on the same line as the adjacent content. That can lead to broken tags and other display issues. This PR fixes all such includes and introduces a validation step that forbids introducing the same problem again.
53 lines
888 B
Plaintext
53 lines
888 B
Plaintext
== Why is this an issue?
|
|
|
|
The Java Language Specification recommends listing modifiers in the following order:
|
|
|
|
|
|
. Annotations
|
|
. public
|
|
. protected
|
|
. private
|
|
. abstract
|
|
. static
|
|
. final
|
|
. transient
|
|
. volatile
|
|
. synchronized
|
|
. native
|
|
. default
|
|
. strictfp
|
|
|
|
Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order.
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,java]
|
|
----
|
|
static public void main(String[] args) { // Noncompliant
|
|
}
|
|
----
|
|
|
|
=== Compliant solution
|
|
|
|
[source,java]
|
|
----
|
|
public static void main(String[] args) { // Compliant
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|