OpenMRS

StartupFilter should not rely on default encoding for InputStreamReader

Replace this line https://github.com/openmrs/openmrs-core/blob/master/web/src/main/java/org/openmrs/web/filter/StartupFilter.java#L271 with new InputStreamReader(templateInputStream, "UTF-8"); Background Information: Using classes and methods that rely on the default system encoding can result in code that works fine in its "home" environment. But that code may break for customers who use different encodings in ways that are extremely difficult to diagnose and nearly, if not completely, impossible to reproduce when it's time to fix them. Use an alternative API and specify a charset name or Charset object explicitly.

Task tags

  • coding

Students who completed this task

Tomasz DomagaƂa

Task type

  • code Code
close

2017