summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/io/Socket.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-12 23:21:47 -0800
committerPaul Phillips <paulp@improving.org>2012-11-19 11:53:44 -0800
commit645c2676dd6699ac24a57dfe750386bbdb827ee8 (patch)
tree8a7391c27b58da5ef5529ce17ce3b1f3178a21e9 /src/compiler/scala/tools/nsc/io/Socket.scala
parent345f937b3441f248ac9156484758fa17b1a78941 (diff)
downloadscala-645c2676dd6699ac24a57dfe750386bbdb827ee8.tar.gz
scala-645c2676dd6699ac24a57dfe750386bbdb827ee8.tar.bz2
scala-645c2676dd6699ac24a57dfe750386bbdb827ee8.zip
Commenting out unused members.
I want to get this commit into the history because the tests pass here, which demonstrates that every commented out method is not only unnecessary internally but has zero test coverage. Since I know (based on the occasional source code comment, or more often based on knowing something about other source bases) that some of these can't be removed without breaking other things, I want to at least record a snapshot of the identities of all these unused and untested methods. This commit will be reverted; then there will be another commit which removes the subset of these methods which I believe to be removable. The remainder are in great need of tests which exercise the interfaces upon which other repositories depend.
Diffstat (limited to 'src/compiler/scala/tools/nsc/io/Socket.scala')
-rw-r--r--src/compiler/scala/tools/nsc/io/Socket.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/io/Socket.scala b/src/compiler/scala/tools/nsc/io/Socket.scala
index e766c1b2fd..cb264a671c 100644
--- a/src/compiler/scala/tools/nsc/io/Socket.scala
+++ b/src/compiler/scala/tools/nsc/io/Socket.scala
@@ -28,13 +28,13 @@ object Socket {
private val optHandler = handlerFn[Option[T]](_ => None)
private val eitherHandler = handlerFn[Either[Throwable, T]](x => Left(x))
- def getOrElse[T1 >: T](alt: T1): T1 = opt getOrElse alt
+ // def getOrElse[T1 >: T](alt: T1): T1 = opt getOrElse alt
def either: Either[Throwable, T] = try Right(f()) catch eitherHandler
def opt: Option[T] = try Some(f()) catch optHandler
}
- def newIPv4Server(port: Int = 0) = new Box(() => preferringIPv4(new ServerSocket(0)))
- def newServer(port: Int = 0) = new Box(() => new ServerSocket(0))
+ // def newIPv4Server(port: Int = 0) = new Box(() => preferringIPv4(new ServerSocket(0)))
+ // def newServer(port: Int = 0) = new Box(() => new ServerSocket(0))
def localhost(port: Int) = apply(InetAddress.getLocalHost(), port)
def apply(host: InetAddress, port: Int) = new Box(() => new Socket(new JSocket(host, port)))
def apply(host: String, port: Int) = new Box(() => new Socket(new JSocket(host, port)))
@@ -62,4 +62,4 @@ class Socket(jsocket: JSocket) extends Streamable.Bytes with Closeable {
out.close()
}
}
-} \ No newline at end of file
+}