Skip to content

[java] false positives on Lombok @Value class fields #2458

@john-karp

Description

@john-karp

Affects PMD Version:
6.23.0

Rule:

Description:

Lombok makes fields of classes annotated with @Value private final by default. See
https://projectlombok.org/features/Value

Code Sample demonstrating the issue:

package com.test;

import lombok.Value;

@Value
public class ValueClass {
    String foo;
}

Expected outcome:

There shouldn't be any violations reported; the rule should not apply to classes annotated with @Value.

Running PMD through: CLI

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:false-positivePMD flags a piece of code that is not problematic

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions