Details
-
Technical task
-
Status: Approved
-
Could
-
Resolution: Fixed
-
None
-
None
-
Low
Description
SonarQube:
The imports part of a file should be handled by the Integrated Development Environment (IDE), not manually by the developer.
Unused and useless imports should not occur if that is the case.
Leaving them in reduces the code's readability, since their presence can be confusing.
Problem:
Undeleted imports that are no longer used.
Solution:
Removal of unused imports.
Where the problem occurs:
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/form/RegisterPatientFormBuilder.java#L43
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/RegisterPatientPageController.java#L3
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/RegisterPatientPageController.java#L6
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/page/controller/RegisterPatientPageController.java#L25
Support materials:
- explanation of the problem by SonarQube: https://sonar.openmrs.org/coding_rules#rule_key=squid%3AUselessImportCheck