From 41703dfef181caa7877aec77e90249264fd37e02 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 24 Feb 2013 23:49:22 +0100 Subject: More explicit empty paren lists in method calls. --- src/reflect/scala/reflect/io/PlainFile.scala | 2 +- src/reflect/scala/reflect/io/Streamable.scala | 6 ++++-- src/reflect/scala/reflect/io/VirtualDirectory.scala | 6 +++--- src/reflect/scala/reflect/io/VirtualFile.scala | 6 +++--- src/reflect/scala/reflect/io/ZipArchive.scala | 14 +++++++------- 5 files changed, 18 insertions(+), 16 deletions(-) (limited to 'src/reflect/scala/reflect/io') diff --git a/src/reflect/scala/reflect/io/PlainFile.scala b/src/reflect/scala/reflect/io/PlainFile.scala index 0d4d55bdec..31df78f995 100644 --- a/src/reflect/scala/reflect/io/PlainFile.scala +++ b/src/reflect/scala/reflect/io/PlainFile.scala @@ -42,7 +42,7 @@ class PlainFile(val givenPath: Path) extends AbstractFile { override def sizeOption = Some(givenPath.length.toInt) override def toString = path - override def hashCode(): Int = fpath.hashCode + override def hashCode(): Int = fpath.hashCode() override def equals(that: Any): Boolean = that match { case x: PlainFile => fpath == x.fpath case _ => false diff --git a/src/reflect/scala/reflect/io/Streamable.scala b/src/reflect/scala/reflect/io/Streamable.scala index b45cffb150..6184c6776a 100644 --- a/src/reflect/scala/reflect/io/Streamable.scala +++ b/src/reflect/scala/reflect/io/Streamable.scala @@ -88,7 +88,7 @@ object Streamable { /** Obtains an InputStreamReader wrapped around a FileInputStream. */ - def reader(codec: Codec): InputStreamReader = new InputStreamReader(inputStream, codec.charSet) + def reader(codec: Codec): InputStreamReader = new InputStreamReader(inputStream(), codec.charSet) /** Wraps a BufferedReader around the result of reader(). */ @@ -115,7 +115,9 @@ object Streamable { finally stream.close() def bytes(is: => InputStream): Array[Byte] = - (new Bytes { def inputStream() = is }).toByteArray + (new Bytes { + def inputStream() = is + }).toByteArray() def slurp(is: => InputStream)(implicit codec: Codec): String = new Chars { def inputStream() = is } slurp codec diff --git a/src/reflect/scala/reflect/io/VirtualDirectory.scala b/src/reflect/scala/reflect/io/VirtualDirectory.scala index 09b99087e6..ae0dd2032c 100644 --- a/src/reflect/scala/reflect/io/VirtualDirectory.scala +++ b/src/reflect/scala/reflect/io/VirtualDirectory.scala @@ -34,15 +34,15 @@ extends AbstractFile { override def output = sys.error("directories cannot be written") /** Does this abstract file denote an existing file? */ - def create() { unsupported } + def create() { unsupported() } /** Delete the underlying file or directory (recursively). */ - def delete() { unsupported } + def delete() { unsupported() } /** Returns an abstract file with the given name. It does not * check that it exists. */ - def lookupNameUnchecked(name: String, directory: Boolean): AbstractFile = unsupported + def lookupNameUnchecked(name: String, directory: Boolean): AbstractFile = unsupported() private val files = mutable.Map.empty[String, AbstractFile] diff --git a/src/reflect/scala/reflect/io/VirtualFile.scala b/src/reflect/scala/reflect/io/VirtualFile.scala index 6f98b8385b..b28ad9f340 100644 --- a/src/reflect/scala/reflect/io/VirtualFile.scala +++ b/src/reflect/scala/reflect/io/VirtualFile.scala @@ -71,10 +71,10 @@ class VirtualFile(val name: String, override val path: String) extends AbstractF } /** Does this abstract file denote an existing file? */ - def create() { unsupported } + def create() { unsupported() } /** Delete the underlying file or directory (recursively). */ - def delete() { unsupported } + def delete() { unsupported() } /** * Returns the abstract file in this abstract directory with the @@ -90,5 +90,5 @@ class VirtualFile(val name: String, override val path: String) extends AbstractF /** Returns an abstract file with the given name. It does not * check that it exists. */ - def lookupNameUnchecked(name: String, directory: Boolean) = unsupported + def lookupNameUnchecked(name: String, directory: Boolean) = unsupported() } diff --git a/src/reflect/scala/reflect/io/ZipArchive.scala b/src/reflect/scala/reflect/io/ZipArchive.scala index 097d3cb71c..78fc8d9cc8 100644 --- a/src/reflect/scala/reflect/io/ZipArchive.scala +++ b/src/reflect/scala/reflect/io/ZipArchive.scala @@ -61,13 +61,13 @@ abstract class ZipArchive(override val file: JFile) extends AbstractFile with Eq override def underlyingSource = Some(this) def isDirectory = true - def lookupName(name: String, directory: Boolean) = unsupported - def lookupNameUnchecked(name: String, directory: Boolean) = unsupported - def create() = unsupported - def delete() = unsupported - def output = unsupported - def container = unsupported - def absolute = unsupported + def lookupName(name: String, directory: Boolean) = unsupported() + def lookupNameUnchecked(name: String, directory: Boolean) = unsupported() + def create() = unsupported() + def delete() = unsupported() + def output = unsupported() + def container = unsupported() + def absolute = unsupported() private def walkIterator(its: Iterator[AbstractFile]): Iterator[AbstractFile] = { its flatMap { f => -- cgit v1.2.3