The code is identical, both examples have too many parameters however since the second example uses the Lombok RequiredArgs constructor it is not detected. The same is true for the Lombok AllArgsConstructor annotation.