Class UpperEllCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class UpperEllCheck
    extends AbstractCheck

    Checks that long constants are defined with an upper ell. That is 'L' and not 'l'. This is in accordance with the Java Language Specification, Section 3.10.1.

    Rationale: The lower-case ell 'l' looks a lot like 1.

    To configure the check:

     <module name="UpperEll"/>
     class Test {
       long var1 = 508987; // OK
       long var2 = 508987l; // violation
       long var3 = 508987L; // OK

    Parent is

    Violation Message Keys:

    • upperEll