mosche commented on a change in pull request #15843:
URL: https://github.com/apache/beam/pull/15843#discussion_r745826518



##########
File path: 
sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsModule.java
##########
@@ -112,7 +112,9 @@ public AWSCredentialsProvider deserializeWithType(
         JsonParser jsonParser, DeserializationContext context, 
TypeDeserializer typeDeserializer)
         throws IOException {
       Map<String, String> asMap =
-          jsonParser.readValueAs(new TypeReference<Map<String, String>>() {});
+          checkNotNull(

Review comment:
       In this case `checkNotNull` is fine 🤯 
   I don't get it why strings are treated differently by checker

##########
File path: 
sdks/java/io/amazon-web-services/src/main/java/org/apache/beam/sdk/io/aws/options/AwsModule.java
##########
@@ -112,7 +112,9 @@ public AWSCredentialsProvider deserializeWithType(
         JsonParser jsonParser, DeserializationContext context, 
TypeDeserializer typeDeserializer)
         throws IOException {
       Map<String, String> asMap =
-          jsonParser.readValueAs(new TypeReference<Map<String, String>>() {});
+          checkNotNull(

Review comment:
       I'm tempted to just reenable `@SuppressWarnings({"nullness"})` for the 
entire class 😳 




-- 
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