question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sonar reports 6 bugs (2 rated blocker, 4 rated major)

See original GitHub issue

Is it worth doing anything about this? https://sonarcloud.io/project/issues?id=dropwizard_dropwizard&resolved=false&types=BUG

I’ve raised a few MRs to address sonar issues in the past where there were clear ways to both improve the code and also quieten the Sonar report, but the remaining group of 6 issues I’m either not sure about or seem like false positives.

I don’t think having sonar grumbling is necessarily a bad thing, but if it’s configured it would be nice if it had a clean report.

The issues:

I’m not convinced any of these are real issues, although I admit to not being very confident about the thread-related ones.

What to do? Close this issue and let Sonar carry on grumbling to nobody in particular, add some suppression magic somewhere or make some code changes?

Mostly I’m raising this to say “I’ve looked at all the issues Sonar reported as major and I’m left with these. Is there anything I can do to clean stuff up further?”

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
rhowecommented, Sep 16, 2021

dropwizard-lifecycle ExecutorServiceBuilder

The JavaDoc of String.format references java.util.Formatter. Maybe one could refactor the code to something like new Formatter().format(...).close(), as this would be a void call then.

This looks viable. PR here: https://github.com/dropwizard/dropwizard/pull/4277

1reaction
rhowecommented, Sep 6, 2021
2. Abort your work and restore interrupt state (without throwing it) - which seems to be your case

Alright, I’ve raised this for consideration: https://github.com/dropwizard/dropwizard/pull/4239

Read more comments on GitHub >

github_iconTop Results From Across the Web

Metric definitions - SonarQube Documentation
Reliability Rating ( reliability_rating ) A = 0 Bugs B = at least 1 Minor Bug C = at least 1 Major Bug...
Read more >
Old lines detected as new code - SonarQube
I have a problem that seems similar to this issue: Issues being reported from old coude outside the new code threshold
Read more >
SonarQube - Issues - Jira
Key Summary Assignee Reporter SONAR‑17767 Improve content security policy for SQ Unassigned Alain Kermis SONAR‑17765 Upgrade Tomcat from 9.0.62 to 9.0.70 Duarte Meneses Duarte Meneses SONAR‑17764...
Read more >
Sonarqube quality gate configuration - Stack Overflow
Rating will be the lowest of all, so for example if you have at least 1 blocker bug, it does not matter how...
Read more >
Metric Definitions | SonarQube Docs
Total count of Code Smell issues raised for the first time on New Code. Maintainability Rating ( sqale_rating ) (Formerly the SQALE rating.)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found