diff options
Diffstat (limited to 'test/files/detach-run')
-rw-r--r-- | test/files/detach-run/actor/actor.scala | 8 | ||||
-rw-r--r-- | test/files/detach-run/basic/Server.scala | 3 | ||||
-rw-r--r-- | test/files/detach-run/basic/basic.scala | 8 |
3 files changed, 12 insertions, 7 deletions
diff --git a/test/files/detach-run/actor/actor.scala b/test/files/detach-run/actor/actor.scala index 958b209594..f3ed4c2d26 100644 --- a/test/files/detach-run/actor/actor.scala +++ b/test/files/detach-run/actor/actor.scala @@ -99,17 +99,19 @@ object Env { def generateJarFile(classNames: List[String]) { val out = new JarOutputStream(new FileOutputStream(deployJar)) - classNames foreach (name => { + classNames foreach (name => try { val classFile = name+".class" - out putNextEntry new JarEntry(classFile) val in = new FileInputStream(outPath+sep+classFile) - val buf = new Array[Byte](256) + out putNextEntry new JarEntry(classFile) + val buf = new Array[Byte](512) var len = in read buf while (len != -1) { out.write(buf, 0, len) len = in read buf } in.close() + } catch { + case e: FileNotFoundException => println(e) }) out.close() } diff --git a/test/files/detach-run/basic/Server.scala b/test/files/detach-run/basic/Server.scala index 601eea3c58..02150b36ff 100644 --- a/test/files/detach-run/basic/Server.scala +++ b/test/files/detach-run/basic/Server.scala @@ -14,4 +14,5 @@ object Server extends ServerConsole { client ! result } server.close() - }
} + } +} diff --git a/test/files/detach-run/basic/basic.scala b/test/files/detach-run/basic/basic.scala index 1bfb838b21..03e56a74a1 100644 --- a/test/files/detach-run/basic/basic.scala +++ b/test/files/detach-run/basic/basic.scala @@ -112,17 +112,19 @@ object Env { def generateJarFile(classNames: List[String]) { val out = new JarOutputStream(new FileOutputStream(deployJar)) - classNames foreach (name => { + classNames foreach (name => try { val classFile = name+".class" - out putNextEntry new JarEntry(classFile) val in = new FileInputStream(outPath+sep+classFile) - val buf = new Array[Byte](256) + out putNextEntry new JarEntry(classFile) + val buf = new Array[Byte](512) var len = in read buf while (len != -1) { out.write(buf, 0, len) len = in read buf } in.close() + } catch { + case e: FileNotFoundException => println(e) }) out.close() } |