For several days I have been reading the OpenMRS Core code and I notice a lot of minor errors, typos and non-compliance with conventions. That’s why I decided since I am browsing classes, I can correct these small mistakes.
The main task, where I grouped several groups of things to improve in the subtasks. Each of them can be assessed separately if it is worth doing or whether it should be left unchanged.
Here I search for places where casting is made without checking that the correct type variable is being cast. This can result in an exception that we do not expect and do not catch explicitly in the code.
Here I search for minor errors in javadocs, typos in the parameters, outdated links etc.
Raw use of parameterized Collection? Is this java 1.4?
Someone did the todo task but forgot to delete the todo.
Here the retVal variable is created and assigned the value true if a string is found. At the same time, the method continues to search, even though it has already found. Correcting this will give us several processor cycles.
Here you can reduce the number of lines of code by replacing iterative iteration through collections with the use of the Collection.removeIf method.
Half of the interfaces have “public” access modifiers, half are not. I wonder if this should not be improved so that all did not have it. In addition, it is worth noting that all methods in interfaces are public, so this modifier is skipped by the compiler.
Using a parameterized constructor instead of the addAll method can improve the readability of the code.
Following https://wiki.openmrs.org/display/docs/Java+Conventions: “Use primitives where possible Rather than Wrapper classes”.
These are not very complicated tasks, so if there is someone who can change the status of at least some of these issues to “ready for work”, it would let me start.
Discussion of individual subtasks is recommended if someone considers the subtask to be unnecessary.