Skip to content

SONARJAVA-4901 S6856 does not raise when parent class defines model attribute#5117

Merged
leonardo-pilastri-sonarsource merged 2 commits intomasterfrom
lp/SONARJAVA-4901
May 1, 2025
Merged

SONARJAVA-4901 S6856 does not raise when parent class defines model attribute#5117
leonardo-pilastri-sonarsource merged 2 commits intomasterfrom
lp/SONARJAVA-4901

Conversation

@leonardo-pilastri-sonarsource
Copy link
Copy Markdown
Contributor

@leonardo-pilastri-sonarsource leonardo-pilastri-sonarsource commented Apr 30, 2025

SONARJAVA-4901

Part of

@sonarqube-next
Copy link
Copy Markdown


public class MissingPathVariableAnnotationCheckSample {

class ParentController {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if the parent is in a different file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At line 30 there is a case marked as FP where the MissingParentChildController extends MissingPathVariableParentInDifferentSample which is a different file. In those cases we do not have access to the parent class declaration and so we cannot see its methods, hence the FP

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you 👍, I missed it

@leonardo-pilastri-sonarsource leonardo-pilastri-sonarsource merged commit 0a95b32 into master May 1, 2025
20 checks passed
@leonardo-pilastri-sonarsource leonardo-pilastri-sonarsource deleted the lp/SONARJAVA-4901 branch May 1, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants