Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix FP in Argument Assert (MET01) #10

Merged
merged 5 commits into from
May 11, 2023
Merged

Fix FP in Argument Assert (MET01) #10

merged 5 commits into from
May 11, 2023

Conversation

JuditKnoll
Copy link
Collaborator

The original PR: spotbugs#2125
Added some new testcases, fixed FP in connection with private methods in Assertation of Arguments, added license header, removed unnecessary IDE settings file.


Make sure these boxes are checked before submitting your PR -- thank you!

  • Added an entry into CHANGELOG.md if you have changed SpotBugs code

* Only interested in public methods
*/
@Override
public void visit(Method obj) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unlike the visitClassContext(ClassContext) function - which is inherited from the ByteCodeScanningDetector -, the visit(Method) function is not used for directing the run of the sawOpcode function, but to implement the main logic of the detector or to set some class variable values.
The function is inherited from BetterVisitor class and the function body is empty, so there is no need to call it.
Instead of this, I added the necessary check to the detect() method.

@baloghadamsoftware baloghadamsoftware merged commit 06a7797 into baloghadamsoftware:SEI_CERT_MET01_J May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants