You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/10/14 00:17:50 UTC

[GitHub] [beam] benWize commented on a change in pull request #15648: [BEAM-11936] Fix some errorprone warnings

benWize commented on a change in pull request #15648:
URL: https://github.com/apache/beam/pull/15648#discussion_r728535774



##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignatures.java
##########
@@ -2396,6 +2396,7 @@ ErrorReporter forParameter(ParameterDescription param) {
               "parameter of type %s at index %s", format(param.getType()), param.getIndex()));
     }
 
+    @SuppressWarnings("AnnotateFormatMethod")

Review comment:
       With `@FormatMethod` here, shows the warning: 
   _error: [FormatStringAnnotation] Format strings must be either literals or variables. Other expressions are not valid.
         errors.checkArgument(
                             ^
     Invalid format string: "Non-splittable, but annotated as @" + ((isBounded == PCollection.IsBounded.BOUNDED) ? format(DoFn.BoundedPerElement.class) : format(DoFn.UnboundedPerElement.class))_
   https://github.com/apache/beam/blob/050478dfa9ff6d8d638920f28431309223db23e9/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignatures.java#L902
   




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org