Details
-
Sub-task
-
Status: Closed
-
Could
-
Resolution: Fixed
-
None
-
None
-
Low
Description
Case:
In some classes, you can meet the raw use of parameterized classes.
Example:
- from the PatientProgram class:
private Set<PatientProgramAttribute> attributes = new LinkedHashSet().
Solution:
In the example, replace LinkedHashSet() with LinkedHashSet<>().
Comments:
- the case of raw use of parameterized classes may also occur in other classes;
- why should not leave the raw use of parameterized class -> https://stackoverflow.com/questions/2770321/what-is-a-raw-type-and-why-shouldnt-we-use-it
Link to place in code for example class:
https://github.com/openmrs/openmrs-core/blob/master/api/src/main/java/org/openmrs/PatientProgram.java#L54