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

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?”

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

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

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