QuackatronHQ / Gigarepo

Potential resource (file handle) leak SC-W1033
Bug risk
Major
1 occurrence in this check
Unclosed file handle (possible leak) in Source.fromFile().mkString
27  def pickInAnOrder(arr: Array[Int], criteria: Int => Boolean): Array[Int] =
28    arr.sortWith(_ < _).filter(criteria)
29
30  def readFile(path: String): String = Source.fromFile(path).mkString31
32  @Deprecated()
33  def cmpArray1(arr1: Array[Int], arr2: Array[Int]): Boolean = arr1 == arr2