Skip to content

Commit 046777d

Browse files
Add nullable annotations, enable test (#2220)
1 parent 19262b7 commit 046777d

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

google-cloud-contrib/google-cloud-nio/src/main/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ protected Path computeNext() {
133133
* Sets options that are only used by the constructor.
134134
*/
135135
@VisibleForTesting
136-
public static void setStorageOptions(StorageOptions newStorageOptions) {
136+
public static void setStorageOptions(@Nullable StorageOptions newStorageOptions) {
137137
futureStorageOptions = newStorageOptions;
138138
}
139139

@@ -157,7 +157,7 @@ public static void setStorageOptions(StorageOptions newStorageOptions) {
157157
*
158158
* @param newDefault new default CloudStorageConfiguration
159159
*/
160-
public static void setDefaultCloudStorageConfiguration(CloudStorageConfiguration newDefault) {
160+
public static void setDefaultCloudStorageConfiguration(@Nullable CloudStorageConfiguration newDefault) {
161161
CloudStorageFileSystem.setDefaultCloudStorageConfiguration(newDefault);
162162
}
163163

google-cloud-contrib/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemProviderTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,7 @@ public void testNullness() throws Exception {
633633
tester.setDefault(Path.class, fs.getPath("and/one"));
634634
tester.setDefault(OpenOption.class, CREATE);
635635
tester.setDefault(CopyOption.class, COPY_ATTRIBUTES);
636-
// can't do that, setStorageOptions accepts a null argument.
637-
// TODO(jart): Figure out how to re-enable this.
638-
// tester.testAllPublicStaticMethods(CloudStorageFileSystemProvider.class);
636+
tester.testAllPublicStaticMethods(CloudStorageFileSystemProvider.class);
639637
tester.testAllPublicInstanceMethods(new CloudStorageFileSystemProvider());
640638
}
641639
}

0 commit comments

Comments
 (0)