Details
-
Technical task
-
Status: Approved
-
Could
-
Resolution: Fixed
-
None
-
None
-
Low
Description
SonarQube:
The Java Language Specification recommends listing modifiers in the following order:
1. Annotations
2. public
3. protected
4. private
5. abstract
6. static
7. final
8. transient
9. volatile
10. synchronized
11. native
12. strictfp
Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order.
Problem:
Wrong order of modifiers.
Solution:
Correct order of modifiers.
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#L57
- https://github.com/openmrs/openmrs-module-registrationapp/blob/1.19.0/omod/src/main/java/org/openmrs/module/registrationapp/form/RegisterPatientFormBuilder.java#L360
Support materials:
- explanation of the problem by SonarQube: https://sonar.openmrs.org/coding_rules#rule_key=squid%3AModifiersOrderCheck