Skip to content

Commit

Permalink
8276845: (fs) java/nio/file/spi/SetDefaultProvider.java fails on x86_32
Browse files Browse the repository at this point in the history
Backport-of: 0f463a7bf73791eda9404882ff63daf9040399bb
  • Loading branch information
shipilev committed Nov 19, 2021
1 parent e4cc0c1 commit 687dd87
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/jdk/java/nio/file/spi/TestProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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;
Expand Down Expand Up @@ -173,6 +174,16 @@ public SeekableByteChannel newByteChannel(Path file,
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();
Expand Down

1 comment on commit 687dd87

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.