summaryrefslogtreecommitdiff
path: root/src/reflect/scala/reflect/io
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-02-24 23:49:22 +0100
committerJason Zaugg <jzaugg@gmail.com>2013-02-24 23:49:22 +0100
commit41703dfef181caa7877aec77e90249264fd37e02 (patch)
tree8eaa4483eecb484bffaf603981ff0ebdabc9e619 /src/reflect/scala/reflect/io
parent6e450ed030aa7a5af53475f1613257a8e12322bc (diff)
downloadscala-41703dfef181caa7877aec77e90249264fd37e02.tar.gz
scala-41703dfef181caa7877aec77e90249264fd37e02.tar.bz2
scala-41703dfef181caa7877aec77e90249264fd37e02.zip
More explicit empty paren lists in method calls.
Diffstat (limited to 'src/reflect/scala/reflect/io')
-rw-r--r--src/reflect/scala/reflect/io/PlainFile.scala2
-rw-r--r--src/reflect/scala/reflect/io/Streamable.scala6
-rw-r--r--src/reflect/scala/reflect/io/VirtualDirectory.scala6
-rw-r--r--src/reflect/scala/reflect/io/VirtualFile.scala6
-rw-r--r--src/reflect/scala/reflect/io/ZipArchive.scala14
5 files changed, 18 insertions, 16 deletions
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 =>