8276845: (fs) java/nio/file/spi/SetDefaultProvider.java fails on x86_32

Reviewed-by: alanb
This commit is contained in:
Aleksey Shipilev 2021-11-10 09:50:27 +00:00
parent e01d6d00bc
commit 0f463a7bf7

View File

@ -28,6 +28,7 @@ import java.nio.file.attribute.FileAttribute;
import java.nio.file.attribute.FileAttributeView;
import java.nio.file.attribute.UserPrincipalLookupService;
import java.nio.file.spi.FileSystemProvider;
import java.nio.channels.FileChannel;
import java.nio.channels.SeekableByteChannel;
import java.net.URI;
import java.io.IOException;
@ -173,6 +174,16 @@ public class TestProvider extends FileSystemProvider {
return defaultProvider.newByteChannel(delegate, options, attrs);
}
@Override
public FileChannel newFileChannel(Path file,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
throws IOException
{
Path delegate = theFileSystem.unwrap(file);
return defaultProvider.newFileChannel(delegate, options, attrs);
}
@Override
public boolean isHidden(Path file) throws IOException {
throw new ReadOnlyFileSystemException();