Skip to content

Files

Latest commit

 

History

History
13 lines (7 loc) · 633 Bytes

ExplicitCallToGetAtMethod.md

File metadata and controls

13 lines (7 loc) · 633 Bytes

Pattern: Explicit call to getAt()

Issue: -

Description

This rule detects when the getAt(Object) method is called directly in code instead of using the [] index operator. A groovier way to express this: a.getAt(b) is this: a[b]. This rule can be configured to ignore this.getAt(Object) using the ignoreThisReference property. It defaults to false, so even getAt(x) will trigger a violation.

This rule also ignores all calls to super.getAt(Object).

Further Reading