diff options
author | michelou <michelou@epfl.ch> | 2010-11-18 17:46:38 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2010-11-18 17:46:38 +0000 |
commit | c5c02cf4ff257bfb23386048ef9b3129eab2baf2 (patch) | |
tree | 4d1c08aa60c9d7f603e9d006f1bd851253bf6f00 /src/detach | |
parent | 13a20ba71ae1805c7361e95d66360bd0a9a7f3d8 (diff) | |
download | scala-c5c02cf4ff257bfb23386048ef9b3129eab2baf2.tar.gz scala-c5c02cf4ff257bfb23386048ef9b3129eab2baf2.tar.bz2 scala-c5c02cf4ff257bfb23386048ef9b3129eab2baf2.zip |
removed duplicated error message for bad compil...
removed duplicated error message for bad compiler options made some
cleanups in detach plugin code
Diffstat (limited to 'src/detach')
-rw-r--r-- | src/detach/library/scala/remoting/Channel.scala | 6 | ||||
-rw-r--r-- | src/detach/library/scala/remoting/Debug.scala | 2 | ||||
-rw-r--r-- | src/detach/library/scala/remoting/detach.scala | 2 | ||||
-rw-r--r-- | src/detach/plugin/scala/tools/detach/Detach.scala | 2 |
4 files changed, 5 insertions, 7 deletions
diff --git a/src/detach/library/scala/remoting/Channel.scala b/src/detach/library/scala/remoting/Channel.scala index 6b1fbcee4e..8e8b79dea1 100644 --- a/src/detach/library/scala/remoting/Channel.scala +++ b/src/detach/library/scala/remoting/Channel.scala @@ -74,7 +74,7 @@ class Channel protected (socket: Socket) { super.resolveClass(desc) } } -/* + // lazy modifier is required! private lazy val in = try { @@ -94,7 +94,7 @@ class Channel protected (socket: Socket) { error("Output stream undefined: "+e.getMessage+" ("+this+")") null } -*/ + /** <code>receive<primtype></code> methods may throw an * <code>IOException</code>. */ @@ -117,7 +117,6 @@ class Channel protected (socket: Socket) { */ @throws(classOf[ChannelException]) def receive[T](implicit expected: reflect.Manifest[T]): T = { - val in = new CustomObjectInputStream(socket.getInputStream) val found = in.readObject().asInstanceOf[reflect.Manifest[_]] info("receive: found="+found+", expected="+expected) import scala.reflect.Manifest @@ -150,7 +149,6 @@ class Channel protected (socket: Socket) { /** <code>send</code> method may throw an <code>IOException</code>. */ def send[T](x: T)(implicit m: reflect.Manifest[T]) { - val out = new ObjectOutputStream(socket.getOutputStream) out writeObject m x match { case x: Unit => // nop diff --git a/src/detach/library/scala/remoting/Debug.scala b/src/detach/library/scala/remoting/Debug.scala index 6a63b8a25d..7a3f0dd91e 100644 --- a/src/detach/library/scala/remoting/Debug.scala +++ b/src/detach/library/scala/remoting/Debug.scala @@ -22,6 +22,6 @@ object Debug extends runtime.remoting.Debug { def getLocation(obj: AnyRef): String = { val s = obj.getClass().getClassLoader().toString() - s.substring(s.indexOf('[')) + s substring s.indexOf('[') } } diff --git a/src/detach/library/scala/remoting/detach.scala b/src/detach/library/scala/remoting/detach.scala index d0fb694af5..5bb53da708 100644 --- a/src/detach/library/scala/remoting/detach.scala +++ b/src/detach/library/scala/remoting/detach.scala @@ -1,6 +1,6 @@ /* __ *\ ** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** +** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL ** ** __\ \/ /__/ __ |/ /__/ __ | http://www.scala-lang.org/ ** ** /____/\___/_/ |_/____/_/ | | ** ** |/ ** diff --git a/src/detach/plugin/scala/tools/detach/Detach.scala b/src/detach/plugin/scala/tools/detach/Detach.scala index f0b0a2a18d..f3116d033c 100644 --- a/src/detach/plugin/scala/tools/detach/Detach.scala +++ b/src/detach/plugin/scala/tools/detach/Detach.scala @@ -25,7 +25,7 @@ abstract class Detach extends PluginComponent new DetachTransformer(unit) // set with the `-P:detach:enable` plugin option (see DetachPlugin) */ - var isEnabled = false + protected[detach] var isEnabled = false private class DetachTransformer(unit: CompilationUnit) extends TypingTransformer(unit) { |