From 3e75e7e462b27fcf64185c08eb10cce5166c9d26 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 21 May 2011 17:45:44 +0000 Subject: Commented out a bug workaround which seems to b... Commented out a bug workaround which seems to be too costly to impose on the general case. No review. --- src/compiler/scala/tools/nsc/io/File.scala | 31 ++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/io/File.scala b/src/compiler/scala/tools/nsc/io/File.scala index b11151ab7e..7086c65ea3 100644 --- a/src/compiler/scala/tools/nsc/io/File.scala +++ b/src/compiler/scala/tools/nsc/io/File.scala @@ -43,20 +43,23 @@ object File { // trigger java.lang.InternalErrors later when using it concurrently. We ignore all // the exceptions so as not to cause spurious failures when no write access is available, // e.g. google app engine. - try { - import Streamable.closing - val tmp = JFile.createTempFile("bug6503430", null, null) - try closing(new FileInputStream(tmp)) { in => - val inc = in.getChannel() - closing(new FileOutputStream(tmp, true)) { out => - out.getChannel().transferFrom(inc, 0, 0) - } - } - finally tmp.delete() - } - catch { - case _: IllegalArgumentException | _: IllegalStateException | _: IOException | _: SecurityException => () - } + // + // XXX need to put this behind a setting. + // + // try { + // import Streamable.closing + // val tmp = JFile.createTempFile("bug6503430", null, null) + // try closing(new FileInputStream(tmp)) { in => + // val inc = in.getChannel() + // closing(new FileOutputStream(tmp, true)) { out => + // out.getChannel().transferFrom(inc, 0, 0) + // } + // } + // finally tmp.delete() + // } + // catch { + // case _: IllegalArgumentException | _: IllegalStateException | _: IOException | _: SecurityException => () + // } } import File._ import Path._ -- cgit v1.2.3