summaryrefslogtreecommitdiff
path: root/src/partest-alternative
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-12 06:17:22 +0000
committerPaul Phillips <paulp@improving.org>2011-01-12 06:17:22 +0000
commit2263afdf115a9a499762ff60fa876c77eccfabc8 (patch)
treedf70c413e5a444713cd67718d69f0f4ead570f07 /src/partest-alternative
parent2e7d7d45557474df61d54e672bedf07a8ff149d4 (diff)
downloadscala-2263afdf115a9a499762ff60fa876c77eccfabc8.tar.gz
scala-2263afdf115a9a499762ff60fa876c77eccfabc8.tar.bz2
scala-2263afdf115a9a499762ff60fa876c77eccfabc8.zip
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.
Diffstat (limited to 'src/partest-alternative')
-rw-r--r--src/partest-alternative/scala/tools/partest/nest/StreamAppender.scala8
1 files changed, 4 insertions, 4 deletions
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()
+ }
}