[apex] AvoidBooleanMethodParameters: False positive on getter and setter
Open
Nobody has claimed this yet.
a:false-positive
- Dominant language
- Java
- Stars
- 5.5k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 54
Description
Affects PMD Version: 7.15.0
Rule: AvoidBooleanMethodParameters
Description:
Rule marks Boolean getter, setter as violation.
Code Sample demonstrating the issue:
public Boolean displayable { get; set; }
Expected outcome:
PMD reports a violation, getter and setter should not be considered as violation of this rule. That's a false positive.
Running PMD through: CLI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the AvoidBooleanMethodParameters rule and reproduce the Apex sample through the CLI. Done means the Boolean property getter and setter are no longer reported as violations for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100