Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
Simplify test not to depend on JDK internals
Browse files Browse the repository at this point in the history
  • Loading branch information
mcimadamore committed Jan 6, 2021
1 parent 4ff84b5 commit aaea5ec
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/jdk/java/foreign/TestByteBuffer.java
Expand Up @@ -25,7 +25,6 @@
* @test
* @modules java.base/sun.nio.ch
* jdk.incubator.foreign/jdk.internal.foreign
* java.base/jdk.internal.jrtfs
* @run testng/othervm -Dforeign.restricted=permit TestByteBuffer
*/

Expand Down Expand Up @@ -77,7 +76,6 @@
import jdk.internal.foreign.HeapMemorySegmentImpl;
import jdk.internal.foreign.MappedMemorySegmentImpl;
import jdk.internal.foreign.NativeMemorySegmentImpl;
import jdk.internal.jrtfs.JrtFileSystemProvider;
import org.testng.SkipException;
import org.testng.annotations.*;
import sun.nio.ch.DirectBuffer;
Expand Down Expand Up @@ -496,7 +494,7 @@ public void testMapZeroSize() throws IOException {

@Test(expectedExceptions = IllegalArgumentException.class)
public void testMapCustomPath() throws IOException {
Path path = new JrtFileSystemProvider().getPath(URI.create("JRT:/"));
Path path = Path.of(URI.create("jrt:/"));
MemorySegment.mapFile(path, 0L, 0L, FileChannel.MapMode.READ_WRITE);
}

Expand Down

0 comments on commit aaea5ec

Please sign in to comment.