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

fix: update CloudStorageFileSystemProvider#getFileAttributeView to return null rather than throw UnsupportedOperationException #1427

Merged
merged 2 commits into from
Jun 25, 2024

Commits on Jun 25, 2024

  1. fix: update CloudStorageFileSystemProvider#getFileAttributeView to re…

    …turn null rather than throw UnsupportedOperationException
    
    Currently, when CloudStorageFileSystemProvider#getFileAttributeView is invoked with a class it doesn't recognize it throws an UnsupportedOperationException. The javadocs for FileSystemProvider, however specify that #getFileAttributeView[1] return null if the attribute view type is not available.
    
    This change updates the behavior of CloudStorageFileSystemProvider#getFileAttributeView to return null rather than throw an exception.
    
    Fixes #1424
    
    [1] https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/spi/FileSystemProvider.html#getFileAttributeView(java.nio.file.Path,java.lang.Class,java.nio.file.LinkOption...)
    BenWhitehead committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    a645997 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b9b15a2 View commit details
    Browse the repository at this point in the history