-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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: resolve SonarCloud issue in App.java #2865 #3236
fix: resolve SonarCloud issue in App.java #2865 #3236
Conversation
PR SummaryThis PR resolves a SonarCloud issue in Changes
autogenerated by presubmit.ai |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM!
Review Summary
Commits Considered (1)
- 7ebf744: fix: resolve SonarCloud issue in App.java Fix high severity issues reported by SonarCloud #2865
Files Processed (1)
- dirty-flag/src/main/java/com/iluwatar/dirtyflag/App.java (1 hunk)
Actionable Comments (0)
Skipped Comments (1)
-
dirty-flag/src/main/java/com/iluwatar/dirtyflag/App.java [76-77]
enhancement: "Remove sleep for production."
Hi @iluwatar, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ LGTM!
Review Summary
Commits Considered (1)
- a8bffc1: Merge branch 'master' into fix/sonar-high-issue-dirty-flag-app
Files Processed (0)
Actionable Comments (0)
Skipped Comments (0)
|
Looks good! Thank you for the contribution 🎉 @all-contributors please add @2897robo for code |
I've put up a pull request to add @2897robo! 🎉 |
What does this PR do?
This PR resolves a high severity issue (java:S2095) reported by SonarCloud in
App.java
.The issue was that
ScheduledExecutorService
was not properly closed, potentially leading to resource leakage.🔗 SonarCloud issue: https://sonarcloud.io/project/issues?id=iluwatar_java-design-patterns&open=AZXOQp-k7L73unJ7u3kj
What did I do?
ScheduledExecutorService
withtry-finally
to ensure proper shutdownThread.sleep(45000)
for demonstration purposes to allow task completion before shutdownReferences
Fixes #2865