28 lines
378 B
Plaintext
28 lines
378 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
With the default regular expression <code>^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$</code>:
|
|
|
|
----
|
|
public class MyClass {
|
|
public static final int first = 1;
|
|
}
|
|
|
|
public enum MyEnum {
|
|
first;
|
|
}
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
----
|
|
public class MyClass {
|
|
public static final int FIRST = 1;
|
|
}
|
|
|
|
public enum MyEnum {
|
|
FIRST;
|
|
}
|
|
----
|