Fixed "Impossible downcast of toArray() result" in StringListParameter

  * Sonar issue: BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY
  * extended the corresponding test
Fixed array stored directly issues reported by Sonar

 * Sonar issue: ArrayIsStoredDirectly
Fixed "Bad practice - Method may fail to close stream"

 * Sonar issue: OS_OPEN_STREAM
Fixed "Bad attempt to compute absolute value of signed 32-bit random integer"

 * Sonar issue: RV_ABSOLUTE_VALUE_OF_RANDOM_INT warnings
fixed "Method may fail to clean up stream or resource on checked exception"

 * Sonar issue: OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE
Fixed "Performance - Method concatenates strings using + in a loop"

 * Sonar issue: SBSC_USE_STRINGBUFFER_CONCATENATION
Merge branch 'feature/sonar-fixes' into develop