From b276a58f7932ab79f9545a73e97eb9c4944afedd Mon Sep 17 00:00:00 2001 From: bleporini Date: Mon, 2 Jun 2014 07:23:42 +0200 Subject: [PATCH] Resource.fromFile doesn't throw any exception Because `new File(file)` doesn't throw any exception when there's no file for the given path. --- core/src/main/scala/scalax/io/Resource.scala | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/src/main/scala/scalax/io/Resource.scala b/core/src/main/scala/scalax/io/Resource.scala index 26025e0..e9e96f3 100644 --- a/core/src/main/scala/scalax/io/Resource.scala +++ b/core/src/main/scala/scalax/io/Resource.scala @@ -536,7 +536,6 @@ object Resource { * @param file the file to use for constructing a Seekable Resource * * @return a SeekableByteChannelResource - * @throws java.io.IOException if file does not exist */ def fromFile(file:File): SeekableByteChannelResource[SeekableByteChannel] = { def open = (opts:Seq[OpenOption]) => support.FileUtils.openChannel(file,opts) @@ -549,7 +548,6 @@ object Resource { * @param file the file to use for constructing a Seekable Resource * * @return a SeekableByteChannelResource - * @throws java.io.IOException if file does not exist */ def fromFile(file:String): SeekableByteChannelResource[SeekableByteChannel] = fromFile(new File(file))