Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[native-image] createTempFile().toPath() fails #1035

Closed
johanvos opened this issue Mar 4, 2019 · 1 comment

Comments

4 participants
@johanvos
Copy link
Contributor

commented Mar 4, 2019

The following application will cause an Error (at least on Linux):

import java.io.File;
import java.nio.file.Files;

public class HelloWorld {

    public static void main(String[] args) throws Exception  {
        File f = Files.createTempFile("foo", ".bar").toFile();
    }
}

Exception in thread "main" java.lang.UnsupportedOperationException: Path not associated with default file system.

For Path instances created using Paths.get(), the Path.getFileSystem() always returns the same value as FileSystems.getDefault(). However, Paths created via Files.createTempFile() return a different value for getFileSystem().

johanvos added a commit to johanvos/graal that referenced this issue Mar 4, 2019

@cstancu cstancu added the native-image label Mar 5, 2019

@vjovanov vjovanov self-assigned this Mar 5, 2019

dougxc pushed a commit that referenced this issue Mar 5, 2019

@cstancu

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

Fixed in f4452fe.

@cstancu cstancu closed this Mar 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.