Reports methods with accessor-like names that have an empty parameter clause.

Methods that follow JavaBean naming contract for accessors are expected to have no side effects. The recommended convention for these methods is to use a parameterless method whenever there are no parameters.

This convention promotes the uniform access principle, which says that client code should not be affected by a decision to implement an attribute as a field or method.

The quick-fix removes the empty parameter clause.

Example:


  trait Test {
    def hasProperty(): Boolean
  }

After the quick-fix is applied:


  trait Test {
    def hasProperty: Boolean
  }

This inspection will not report methods that override other members.