File tree Expand file tree Collapse file tree 1 file changed +3
-15
lines changed
Expand file tree Collapse file tree 1 file changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -141,22 +141,10 @@ class DefaultReporter(debugSections: Set[DebugSection]) extends Reporter(debugSe
141141 printLineContent(msg.position)
142142 }
143143
144- protected var linesOf = Map [java.io.File , List [String ]]()
145-
146144 def getLine (pos : Position ): Option [String ] = {
147- val lines = linesOf.get(pos.file) match {
148- case Some (lines) =>
149- lines
150- case None =>
151- val lines = if (pos == NoPosition ) {
152- Nil
153- } else {
154- scala.io.Source .fromFile(pos.file).getLines.toList
155- }
156-
157- linesOf += pos.file -> lines
158- lines
159- }
145+ val lines =
146+ if (pos == NoPosition ) Nil
147+ else scala.io.Source .fromFile(pos.file).getLines.toList
160148
161149 if (lines.size >= pos.line && pos.line > 0 ) {
162150 Some (lines(pos.line - 1 ))
You can’t perform that action at this time.
0 commit comments