Removed ambiguity on "Console" when necessary to compile with Java 1.6.

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@8316 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
dubochet 2006-08-04 11:54:52 +00:00
parent 874524254a
commit 5d7dfede8c
4 changed files with 19 additions and 19 deletions

View File

@ -19,7 +19,7 @@ class JavaSerializer(serv: Service) extends Serializer(serv) {
val debug = true
def log (s: String) =
if (debug) Console.println("JAVASerializer: " + s)
if (debug) scala.Console.println("JAVASerializer: " + s)
def serialize(o: AnyRef): Array[Byte] = {
val bos = new ByteArrayOutputStream()

View File

@ -31,19 +31,19 @@ abstract class RemotePid(locId: int, kern: NetKernel, actor: RemoteActor) extend
//[throws(classOf[IOException])]
private def writeObject(out: ObjectOutputStream): Unit = {
//Console.println("writing locID"+locId)
//scala.Console.println("writing locID"+locId)
out.writeInt(locId)
}
//[throws(classOf[IOException]), throws(classOf[ClassNotFoundException])]
private def readObject(in: ObjectInputStream): Unit = {
_locId = in.readInt()
//Console.println("read _locID"+_locId)
//scala.Console.println("read _locID"+_locId)
}
//[throws(classOf[ObjectStreamException])]
private def readResolve(): AnyRef = {
Console.println("readResolve")
scala.Console.println("readResolve")
null
//build nothing. Subclasses will do...
}
@ -55,7 +55,7 @@ abstract class RemotePid(locId: int, kern: NetKernel, actor: RemoteActor) extend
def kernel = kern;
override def !(msg: Any): unit = {
//Console.println("! " + msg)
//scala.Console.println("! " + msg)
if (actor != null)
actor send msg
else
@ -181,15 +181,15 @@ object CaseTest {
val pid1 = JXTAPid (node, 4, null, null);
val pid2 = JXTAPid (node, 4, new NetKernel(null), null);
Console.println("node Before: " + node)
Console.println("node After : " + getObject(getBytes(node)))
scala.Console.println("node Before: " + node)
scala.Console.println("node After : " + getObject(getBytes(node)))
Console.println("pid1 Before: " + pid1)
Console.println("pid1 After : " + getObject(getBytes(pid1)))
scala.Console.println("pid1 Before: " + pid1)
scala.Console.println("pid1 After : " + getObject(getBytes(pid1)))
Console.println("pid2 Before: " + pid2)
Console.println("pid2 After : " + getObject(getBytes(pid2)))
scala.Console.println("pid2 Before: " + pid2)
scala.Console.println("pid2 After : " + getObject(getBytes(pid2)))
Console.println("pid2 After : " + getObject((new String (getBytes(pid2))).getBytes))
scala.Console.println("pid2 After : " + getObject((new String (getBytes(pid2))).getBytes))
}
}

View File

@ -48,21 +48,21 @@ class TcpServiceWorker(parent: TcpService, so: Socket) extends Thread {
}
def sendNode = {
Console.println("Sending our name " + parent.node)
scala.Console.println("Sending our name " + parent.node)
parent.serializer.writeObject(dataout, parent.node)
}
var connectedNode: TcpNode = _
def readNode = {
Console.println("" + parent.node + ": Reading node name...")
scala.Console.println("" + parent.node + ": Reading node name...")
//val node = parent.serializer.deserialize(reader)
val node = parent.serializer.readObject(datain)
Console.println("Connection from " + node)
scala.Console.println("Connection from " + node)
node match {
case n: TcpNode => {
connectedNode = n
Console.println("Adding connection to " + node + " to table.")
scala.Console.println("Adding connection to " + node + " to table.")
parent.addConnection(n, this)
}
}
@ -88,11 +88,11 @@ class TcpServiceWorker(parent: TcpService, so: Socket) extends Thread {
}
catch {
case ioe: IOException =>
Console.println("" + ioe + " while reading from socket.");
scala.Console.println("" + ioe + " while reading from socket.");
parent nodeDown connectedNode
case e: Exception =>
// catch-all
Console.println("" + e + " while reading from socket.");
scala.Console.println("" + e + " while reading from socket.");
parent nodeDown connectedNode
}
}

View File

@ -269,7 +269,7 @@ object ScriptRunner {
{
val f = new File(scriptFile)
if (!f.exists || f.isDirectory) {
Console.println("no such file: " + scriptFile)
scala.Console.println("no such file: " + scriptFile)
return
}