Skip to content

Files

Latest commit

 

History

History
23 lines (14 loc) · 612 Bytes

MethodParameterTypeRequired.md

File metadata and controls

23 lines (14 loc) · 612 Bytes

Pattern: Dynamic parameter return type

Issue: -

Description

Checks that method parameters are not dynamically typed, that is they are explicitly stated and different than def.

Example of violations:

void methodWithDynamicParameter(def parameter) {              // violation
}

void methodWithParameterWithoutTypeDeclaration(parameter) {   // violation
}

void methodWithObjectParameter(Object parameter)              // OK

Further Reading