diff --git a/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/gcloud/storage/contrib/nio/CloudStorageFileSystemProvider.java b/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/gcloud/storage/contrib/nio/CloudStorageFileSystemProvider.java index 93ef1b4ac3e9..5fbcf754cc76 100644 --- a/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/gcloud/storage/contrib/nio/CloudStorageFileSystemProvider.java +++ b/gcloud-java-contrib/gcloud-java-nio/src/main/java/com/google/gcloud/storage/contrib/nio/CloudStorageFileSystemProvider.java @@ -82,6 +82,11 @@ @AutoService(FileSystemProvider.class) public final class CloudStorageFileSystemProvider extends FileSystemProvider { + private final Storage storage; + + // used only when we create a new instance of CloudStorageFileSystemProvider. + private static StorageOptions defaultStorageOptions; + private static class LazyPathIterator extends AbstractIterator { private final Iterator blobIterator; private final Filter filter; @@ -109,12 +114,6 @@ protected Path computeNext() { } } - - private final Storage storage; - - // used only when we create a new instance of CloudStorageFileSystemProvider. - private static StorageOptions defaultStorageOptions; - /** * Sets default options that are only used by the constructor. */ @@ -575,9 +574,9 @@ public Iterator iterator() { return new LazyPathIterator(cloudPath.getFileSystem(), blobIterator, filter); } - // Does nothing since there's nothing to close. Commenting this method to quiet codacy. @Override public void close() throws IOException { + // Does nothing since there's nothing to close. Commenting this method to quiet codacy. } }; } diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/FakeStorageRpc.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/FakeStorageRpc.java index 972a2ab870a1..01e07a46d4f4 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/FakeStorageRpc.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/FakeStorageRpc.java @@ -101,10 +101,10 @@ public Tuple> list(String bucket, Map if (preprefix.startsWith("/")) { preprefix = preprefix.substring(1); } - continue; + break; case FIELDS: // ignore and return all the fields - continue; + break; default: throw new UnsupportedOperationException("Unknown option: " + e.getKey()); }