Skip to content

[java] New rule: LongLiteralEndingWithLowercaseL #7027

Closed

Description

@zbynek

Proposed Rule Name: LongLiteralEndingWithLowercaseL

Proposed Category: Error Prone

Description:

To avoid confusion between 1 and l, use L to indicate long literals. The proposed rule name is aligned with IntelliJ

https://www.jetbrains.com/help/inspectopedia/LongLiteralEndingWithLowercaseL.html

Code Sample:

class Longs {
  long bad = 1l; // bad, may be confusing with some fonts
  long good = 1L; // good
}

Possible Properties:

none


Currently possible as XPath rule using //NumericLiteral[matches(@Image,'.*l')]

Activity

  1. added
    a:new-rule
    on Sep 2, 2026
  2. added this to the 7.28.0 milestone on Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

a:new-rule

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions