Skip to content

Fix the remaining SonarCloud issues in Controller and AutosaveController - #230

Merged
mfl28 merged 1 commit into
masterfrom
refactor/controller-sonar
Oct 11, 2026
Merged

mfl28 merged 1 commit into
masterfrom
refactor/controller-sonar

Conversation

@mfl28

@mfl28 mfl28 commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Follow-up to #228 and #229: the SonarCloud issues left in Controller, and two that came in with AutosaveController. No behavior changes.

Controller

  • Four methods that only one Operations class uses moved into that class (S3398):
    • startImageMetaDataLoadingService, updateViewImageFiles and clearViewAndModel into ImageFolderOperations;
    • clearModelAndViewAnnotationData into AnnotationIoOperations.
  • An unused catch variable is unnamed (S7467).

AutosaveController

  • Blocker S1845: the field delay and the constant DELAY differed only in case. They're now saveTimer and SAVE_DELAY.
  • Major S107: the constructor had 8 parameters. The timer is now created through Operations.createTimer, next to the other JavaFX-related operations, so it has 7. The app's Controller returns AutosaveController.createSaveTimer (a PauseTransition), and the unit tests return their fake timer from the mocked Operations.

The full suite (306 tests) passes locally.

Controller: the four methods that only one Operations class uses moved into
it, and an unused catch variable is unnamed.

AutosaveController: the timer field no longer clashes with the delay
constant (saveTimer, SAVE_DELAY), and the timer is created through
Operations.createTimer, so the constructor has 7 parameters.
@mfl28
mfl28 enabled auto-merge (squash) October 11, 2026 11:48
@sonarqubecloud

Copy link
Copy Markdown

@mfl28
mfl28 merged commit e9686b5 into master Oct 11, 2026
17 checks passed
@mfl28
mfl28 deleted the refactor/controller-sonar branch October 11, 2026 11:51
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.38710% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.24%. Comparing base (fc23983) to head (c62b09d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...mfl28/boundingboxeditor/controller/Controller.java 98.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master     #230   +/-   ##
=========================================
  Coverage     90.24%   90.24%           
+ Complexity     2389     2384    -5     
=========================================
  Files           140      140           
  Lines          8963     8964    +1     
  Branches        860      860           
=========================================
+ Hits           8089     8090    +1     
  Misses          455      455           
  Partials        419      419           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Successfully merging this pull request may close these issues.

1 participant