nitinware commented on code in PR #40146:
URL: https://github.com/apache/beam/pull/40146#discussion_r4043449347


##########
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/gcsfs/GcsPath.java:
##########
@@ -233,6 +235,9 @@ public void setFileSystem(FileSystem fs) {
   }
 
   @Override
+  // fs is null for paths not attached to a filesystem (e.g. created via 
fromUri/fromComponents);
+  // returning it preserves prior behavior. Path.getFileSystem is not 
annotated for nullness.
+  @SuppressWarnings("nullness")

Review Comment:
   @kennknowles Done. Added @Nullable to the return type. Kept 
@SuppressWarnings("nullness") because java.nio.file.Path.getFileSystem() is 
treated as non-null, so the checker rejects our @Nullable override wi



##########
sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/extensions/gcp/util/GcsUtilV1.java:
##########
@@ -828,6 +841,9 @@ void verifyBucketAccessible(GcsPath path, BackOff backoff, 
Sleeper sleeper) thro
     getBucket(path, backoff, sleeper);
   }
 
+  // AccessDeniedException permits a null "other" argument and these 
exceptions permit a null detail
+  // message, but the JDK constructor stubs are not annotated for nullness.
+  @SuppressWarnings("nullness")

Review Comment:
   @kennknowles  Done. Extracted helper methods for AccessDeniedException, 
FileAlreadyExistsException, and FileNotFoundException. This removes the 
method-level suppressions and limits each suppression to a single constructor 
call.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to