In records, introduced in Java 16, there are 2 ways to write a custom constructor: canonical and compact.
A canonical constructor is an ordinary constructor with arguments for all private fields. The default implementation just provides initialization for all private fields and there is no need to write it manually. You might want to write it yourself when you need to customize the constructor logic.
A compact constructor doesn't have parameters defined explicitly, parentheses are omitted and access to private fields is not possible (even via ``++this++``). The compact constructor has access to the constructor's arguments and its body is executed right before the field initialization. It's a perfect place to provide validation.
This rule reports an issue when a canonical constructor can be easily replaced by a compact version when these requirements are met: