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

NullPointer exception in eco code java Sonar plugin #69

Open
rrousset-michelin opened this issue Sep 17, 2024 · 1 comment · May be fixed by #70
Open

NullPointer exception in eco code java Sonar plugin #69

rrousset-michelin opened this issue Sep 17, 2024 · 1 comment · May be fixed by #70
Assignees
Labels
🔥 in progress 🔥 💉 bug Something isn't working

Comments

@rrousset-michelin
Copy link

While launching java eco code plugin with maven sonar goal, i obtained the following error :

[ERROR] 07:05:13.649 Unable to run check class fr.greencodeinitiative.java.checks.FreeResourcesOfAutoCloseableInterface - EC79 on file 's4c_batch/src/main/java/com/michelin/s4c/service/DefaultStockReportGenerationService.java', To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
java.lang.NullPointerException: Cannot invoke "java.util.List.add(Object)" because the return value of "java.util.Deque.peek()" is null

It is with the plugin version 1.6.2

@rrousset-michelin
Copy link
Author

Hello, i fixed the issue:
https://github.com/green-code-initiative/ecoCode-java/pull/70/files

Let me know if it is ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔥 in progress 🔥 💉 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants