Adapted recent tests to pass on Windows

This commit is contained in:
Juergen Hoeller
2016-09-15 14:12:49 +02:00
parent 6dc1898dbb
commit 6de4b12992
2 changed files with 11 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ import java.io.FileNotFoundException;
import java.net.URI;
import java.nio.ByteBuffer;
import java.nio.channels.ReadableByteChannel;
import java.nio.file.AccessDeniedException;
import java.nio.file.NoSuchFileException;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -312,7 +313,12 @@ public class PathResourceTests {
@Test
public void getReadableByteChannelForDir() throws Exception {
PathResource resource = new PathResource(TEST_DIR);
resource.readableChannel();
try {
resource.readableChannel();
}
catch (AccessDeniedException ex) {
// on Windows
}
}
@Test