[ 
https://issues.apache.org/jira/browse/BEAM-11936?focusedWorklogId=665876&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-665876
 ]

ASF GitHub Bot logged work on BEAM-11936:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Oct/21 00:41
            Start Date: 17/Oct/21 00:41
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on a change in pull request 
#15648:
URL: https://github.com/apache/beam/pull/15648#discussion_r730096144



##########
File path: 
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/renderer/PortablePipelineDotRenderer.java
##########
@@ -104,8 +102,8 @@ private void exitBlock() {
     indent -= 4;
   }
 
-  @FormatMethod
-  private void writeLine(@FormatString String format, Object... args) {
+  @SuppressWarnings("AnnotateFormatMethod")
+  private void writeLine(String format, Object... args) {

Review comment:
       Awesome, thanks!
   
   Could you update these to use the common dependency defined in 
BeamModulePlugin.groovy: 
https://github.com/apache/beam/blob/52a178f0a66829bbd1d99fcaf70921a8bd9300f6/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy#L537
   
   Should be able to use `compileOnly library.java.errorprone_annotations`

##########
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:
       I think that's a legitimate error being caught by the 
`AnnotateFormatMethod` check. Could you try changing 
https://github.com/apache/beam/blob/52a178f0a66829bbd1d99fcaf70921a8bd9300f6/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignatures.java#L899-L904
   
   to:
   ```
         errors.checkArgument( 
             isBounded == null, 
             "Non-splittable, but annotated as @%s", 
              ((isBounded == PCollection.IsBounded.BOUNDED) 
                   ? format(DoFn.BoundedPerElement.class) 
                   : format(DoFn.UnboundedPerElement.class))); 
   ```

##########
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:
       I think that's a legitimate error being caught by the 
`AnnotateFormatMethod` check. Could you try changing 
https://github.com/apache/beam/blob/52a178f0a66829bbd1d99fcaf70921a8bd9300f6/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/reflect/DoFnSignatures.java#L899-L904
   
   to:
   ```java
         errors.checkArgument( 
             isBounded == null, 
             "Non-splittable, but annotated as @%s", 
              ((isBounded == PCollection.IsBounded.BOUNDED) 
                   ? format(DoFn.BoundedPerElement.class) 
                   : format(DoFn.UnboundedPerElement.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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 665876)
    Time Spent: 9h 20m  (was: 9h 10m)

> Fix errorprone 2.3.4 ignored warnings
> -------------------------------------
>
>                 Key: BEAM-11936
>                 URL: https://issues.apache.org/jira/browse/BEAM-11936
>             Project: Beam
>          Issue Type: Task
>          Components: build-system, runner-core, sdk-java-core, 
> sdk-java-harness
>            Reporter: Brian Hulette
>            Assignee: Benjamin Gonzalez
>            Priority: P3
>          Time Spent: 9h 20m
>  Remaining Estimate: 0h
>
> Upgrading to errorprone 2.3.4 (https://github.com/apache/beam/pull/14148) 
> required ignoring a lot of new warnings. We should fix the offending code and 
> re-enable these warnings.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to