Commit 053982ae authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #11401 from douglascardoso:master

* pr/11401:
  Log inaccessible file in RandomAccessDataFile
parents 970b16f8 feecc276
......@@ -64,7 +64,8 @@ public class RandomAccessDataFile implements RandomAccessData {
throw new IllegalArgumentException("File must not be null");
}
if (!file.exists()) {
throw new IllegalArgumentException("File must exist");
throw new IllegalArgumentException(String.format(
"File %s must exist", file.getAbsolutePath()));
}
this.file = file;
this.filePool = new FilePool(file, concurrentReads);
......
......@@ -106,7 +106,7 @@ public class RandomAccessDataFileTests {
@Test
public void fileExists() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("File must exist");
this.thrown.expectMessage("File /does/not/exist must exist");
new RandomAccessDataFile(new File("/does/not/exist"));
}
......@@ -120,7 +120,7 @@ public class RandomAccessDataFileTests {
@Test
public void fileExistsWithConcurrentReads() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("File must exist");
this.thrown.expectMessage("File /does/not/exist must exist");
new RandomAccessDataFile(new File("/does/not/exist"), 1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment