OpenMRS

toolContext in StartupFilter should not hide class level toolContext

Rename the local variable named tooContext at https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/web/filter/StartupFilter.java#L234 to some something else such that it does not hide the class level variable at https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/web/filter/StartupFilter.java#L94 Background Information: Local variables should not shadow class fields Shadowing fields with a local variable or with a method parameter is a bad practice reducing code readability: It makes it confusing to know whether the field or the variable is and should be accessed.

Task tags

  • coding

Students who completed this task

Tomasz DomagaƂa

Task type

  • code Code
close

2017