diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-07-13 14:23:56 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-07-13 14:23:56 +0000 |
commit | 0b09e1d2e42c741a86668296b8b2e269dfad68cf (patch) | |
tree | 090761923263979b54eb2222e4954c3ceee744af /src/compiler/scala/tools/nsc/CompileSocket.scala | |
parent | 5d3674cbabefe9f762c9cbe8be0889ac9c766385 (diff) | |
download | scala-0b09e1d2e42c741a86668296b8b2e269dfad68cf.tar.gz scala-0b09e1d2e42c741a86668296b8b2e269dfad68cf.tar.bz2 scala-0b09e1d2e42c741a86668296b8b2e269dfad68cf.zip |
- made password one word, not two
- save the password as a UTF-8 string, not UTF-16
Diffstat (limited to 'src/compiler/scala/tools/nsc/CompileSocket.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompileSocket.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileSocket.scala b/src/compiler/scala/tools/nsc/CompileSocket.scala index 15dad1df53..c5ae8131e1 100644 --- a/src/compiler/scala/tools/nsc/CompileSocket.scala +++ b/src/compiler/scala/tools/nsc/CompileSocket.scala @@ -87,8 +87,8 @@ object CompileSocket { /** Set the port number to which a scala compile server is connected */ def setPort(port: int): unit = try { - val f = new DataOutputStream(new FileOutputStream(portFile(port))) - f.writeChars(new java.util.Random().nextInt.toString) + val f = new PrintWriter(new FileOutputStream(portFile(port))) + f.println(new java.util.Random().nextInt.toString) f.close() } catch { case ex: IOException => @@ -153,8 +153,8 @@ object CompileSocket { exit(1) } - def getPassWord(port: int): String = { - val f = new DataInputStream(new FileInputStream(portFile(port))) + def getPassword(port: int): String = { + val f = new BufferedReader(new FileReader(portFile(port))) val result = f.readLine() f.close() result |