From 2263afdf115a9a499762ff60fa876c77eccfabc8 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 12 Jan 2011 06:17:22 +0000 Subject: Some fixes for partest issues. prejudice and puts the new process code to work instead. There are still a couple bugs on my short term partest list. If this commit causes some weird issue which only arises on virtualized windows you can expect to hear from me next by postcard from st. lucia. No review. --- .../scala/tools/partest/nest/StreamAppender.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/partest-alternative') diff --git a/src/partest-alternative/scala/tools/partest/nest/StreamAppender.scala b/src/partest-alternative/scala/tools/partest/nest/StreamAppender.scala index 8cebcf1685..3d1cee95c6 100644 --- a/src/partest-alternative/scala/tools/partest/nest/StreamAppender.scala +++ b/src/partest-alternative/scala/tools/partest/nest/StreamAppender.scala @@ -83,12 +83,12 @@ object StreamAppender { class StreamAppender(reader: BufferedReader, writer: PrintWriter) extends Runnable { override def run() = runAndMap(identity) private def lines() = Iterator continually reader.readLine() takeWhile (_ != null) - def closeAll() = { - reader.close() - writer.close() - } def runAndMap(f: String => String) = try lines() map f foreach (writer println _) catch { case e: IOException => e.printStackTrace() } + finally { + reader.close() + writer.close() + } } -- cgit v1.2.3