Visitar URL original
[NIO] Inconsistent failure messages · Issue #2090 · googleapis/google-cloud-java · GitHub
Skip to content

[NIO] Inconsistent failure messages #2090

Closed

Description

@Horneth

Different operations have inconsistent error messages such that for example trying to read from a non existing object, or trying to get its size do not return the same path format.

Opening a readChannel on a non existing object yields

java.nio.file.NoSuchFileException: gs://nonexistingbucket/path/doesnt/exist
	at com.google.cloud.storage.contrib.nio.CloudStorageReadChannel.fetchSize(CloudStorageReadChannel.java:196)
	at com.google.cloud.storage.contrib.nio.CloudStorageReadChannel.<init>(CloudStorageReadChannel.java:72)
	at com.google.cloud.storage.contrib.nio.CloudStorageReadChannel.create(CloudStorageReadChannel.java:62)
	at com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider.newReadChannel(CloudStorageFileSystemProvider.java:268)
	at com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider.newByteChannel(CloudStorageFileSystemProvider.java:229)

And trying to get attributes on the same non existing object yields

java.nio.file.NoSuchFileException: nonexistingbucket/path/doesnt/exist
	at com.google.cloud.storage.contrib.nio.CloudStorageFileSystemProvider.readAttributes(CloudStorageFileSystemProvider.java:575)
	at java.nio.file.Files.readAttributes(Files.java:1737)
	at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219)
	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276)
	at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
	at java.nio.file.FileTreeIterator.<init>(FileTreeIterator.java:72)
	at java.nio.file.Files.walk(Files.java:3574)

Activity

  1. self-assigned this
    on May 30, 2017
  2. vam-google commented on May 30, 2017

    @vam-google
    Contributor

    @Horneth please check #2096

  3. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on May 30, 2017
  4. vam-google commented on Aug 11, 2017

    @vam-google
    Contributor

    Please check #2330 (a duplicate PR, since travis cannot build the original PR).

  5. vam-google commented on Aug 11, 2017

    @vam-google
    Contributor

    Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions