Skip to content

Files#readAttributes throws NullPointerException for non existent attribute view. #212

@tzezula

Description

@tzezula

Files#readAttributes throws a NullPointerException for a nonexistent attribute view, but according to Javadoc, it should throw an UnsupportedOperationException.

Test case:

public static void main(String... args) throws IOException {
        try (java.nio.file.FileSystem nioFs1 = Jimfs.newFileSystem()) {
            Path test = nioFs1.getPath("test");
            Files.createFile(test);
            Files.readAttributes(test, "nonexistview:*");
        } catch (UnsupportedOperationException unsupported) {
            // expected
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3type=defectBug, not working as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions