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

Remove duplicated null and body checks in AbstractCallGraphAlgorithm #1165

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Liyw979
Copy link
Contributor

@Liyw979 Liyw979 commented Jan 23, 2025

No description provided.

@Liyw979
Copy link
Contributor Author

Liyw979 commented Jan 23, 2025

Look like there is something wrong with the CI ...

Error: This request has been automatically failed because it uses a deprecated version of `actions/upload-artifact: v3`. Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/

@JonasKlauke
Copy link
Collaborator

JonasKlauke commented Jan 24, 2025

I get that we can save time by doing the check before, but also these Methods have visibility protected. Shouldnt we provide robust methods as a framework?

@JonasKlauke
Copy link
Collaborator

The null check can be saved if we annote the parameter with nonnull. I'm not sure if we should remove the body check

@swissiety
Copy link
Collaborator

we can kill these nullchecks here as with @Nonnull parameters they just hide bugs originating from somewhere else. Especially when these methods are not public api we should be able to control the originating parts.
Would keep the hasBody unless we make sure even isAbstract() and isNative() will refer to a default/emptyBody.

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.

3 participants