diff options
author | Paul Phillips <paulp@improving.org> | 2010-03-04 05:22:57 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-03-04 05:22:57 +0000 |
commit | 34b8e8fcbbb1b11ce81bf69b730abcb78b6699ec (patch) | |
tree | b2ae69f2731acde0ec4b921cf2e1a73295ea3250 /src/compiler/scala/tools/nsc/io/ZipArchive.scala | |
parent | 65520ac86f5362bfa438c0b9e1a84f1f558e2618 (diff) | |
download | scala-34b8e8fcbbb1b11ce81bf69b730abcb78b6699ec.tar.gz scala-34b8e8fcbbb1b11ce81bf69b730abcb78b6699ec.tar.bz2 scala-34b8e8fcbbb1b11ce81bf69b730abcb78b6699ec.zip |
A few yards short of the goal posts attempt at ...
A few yards short of the goal posts attempt at making our usage of
Throwable subclasses more consistent. This patch eliminates a lot of
ad hoc Exception/Error/etc. creation and various arbitrary choices are
rendered slightly less arbitrary. From now on let's try not to use the
word "Exception" or "Error" in the names of Throwable subclasses unless
they actually derive (and make sense to derive) from Exception or Error.
Review by community.
Diffstat (limited to 'src/compiler/scala/tools/nsc/io/ZipArchive.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/io/ZipArchive.scala | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/io/ZipArchive.scala b/src/compiler/scala/tools/nsc/io/ZipArchive.scala index aa92b896db..9d062a45f1 100644 --- a/src/compiler/scala/tools/nsc/io/ZipArchive.scala +++ b/src/compiler/scala/tools/nsc/io/ZipArchive.scala @@ -157,8 +157,7 @@ private[io] trait ZipContainer extends AbstractFile /** Returns an abstract file with the given name. It does not * check that it exists. */ - override def lookupNameUnchecked(name: String, directory: Boolean): AbstractFile = - throw new UnsupportedOperationException() + override def lookupNameUnchecked(name: String, directory: Boolean) = unsupported /** Returns all abstract subfiles of this abstract directory. */ override def iterator: Iterator[AbstractFile] = root.iterator @@ -274,10 +273,10 @@ final class URLZipArchive(url: URL) extends AbstractFile with ZipContainer /** Methods we don't support but have to implement because of the design */ def file: JFile = null - def create: Unit = throw new UnsupportedOperationException - def delete: Unit = throw new UnsupportedOperationException - def output = throw new Error("unsupported") - def container = throw new Error("unsupported") + def create: Unit = unsupported + def delete: Unit = unsupported + def output = unsupported + def container = unsupported abstract class Entry(name: String, path: String) extends VirtualFile(name, path) { final override def path = "%s(%s)".format(URLZipArchive.this, super.path) |