GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] CommentDefaultAccessModifier should consider lombok's @Value · Issue #4201 · pmd/pmd

[java] CommentDefaultAccessModifier should consider lombok's @Value #4201

New issue
Copy link
New issue
Copy link
Closed
#4202
Closed
[java] CommentDefaultAccessModifier should consider lombok's @Value#4201
#4202
Copy link
Labels
a:false-positivePMD flags a piece of code that is not problematic
Milestone
6.52.0

Description

@LynnBroe
LynnBroe
opened on Nov 9, 2022
Issue body actions

Affects PMD Version:6.51.0

Rule: CommentDefaultAccessModifier

Please provide the rule name and a link to the rule documentation:
https://pmd.github.io/latest/pmd_rules_java_codestyle.html#commentdefaultaccessmodifier

Description:
In the following code example, annotation @Value can add modifiers to the field fo$o, contradicted with default access modifier, so that no need to add a comment before its declaration, and this is a false positive.

Code Sample demonstrating the issue:

import lombok.Value;
@Value
public class Test {
    int fo$o;
}

Expected outcome:

PMD reports a violation at line 4, but that's wrong. That's a false positive.

Running PMD through: CLI

Activity

  1. LynnBroe
    added
    a:false-positivePMD flags a piece of code that is not problematic
    on Nov 9, 2022
  2. adangel
    added this to the 6.52.0 milestone on Nov 11, 2022
  3. adangel
    closed this as completedin a6256f9on Nov 11, 2022
  4. adangel
    added 2 commits that reference this issue on Nov 11, 2022

    [doc] Update release notes (#4200, #4201, #4202)

    f28bb76

    Merge pull request #4202 from LynnBroe:master

    e2a845e
  5. adangel
    added a commit that references this issue on Oct 31, 2024

    [java] Comment existing test case for pmd#2458 (pmd#4201)

    7c0fd45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      • 6.52.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.