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

java.util.Objects.isNull not recognized? #1711

Open
System25 opened this issue Dec 14, 2022 · 0 comments
Open

java.util.Objects.isNull not recognized? #1711

System25 opened this issue Dec 14, 2022 · 0 comments

Comments

@System25
Copy link

Hi, it seems that Infer is not recognizing the "isNull" method in java.utils.Objects.

  • Infer version v1.1.0
  • Operating system MacOS Ventura
  • Commands:
infer capture -- ./gradlew --offline clean assemble
infer analyze --fail-on-issue
  • Example:
01. var client = getClient();
02. if (java.util.Objects.isNull(client)) {
03.      throw new RuntimeException("client is null");
04. }
05. final var data = client.getData();

This codes produces a error: Null Dereference object client last assigned on line 01 could be null and is dereferenced at line 05.
The same code does not produce error if I replace "java.util.Objects.isNull(client)" by "client == null".

Thanks

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

No branches or pull requests

1 participant