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

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

                Author: ASF GitHub Bot
            Created on: 09/Jun/18 04:35
            Start Date: 09/Jun/18 04:35
    Worklog Time Spent: 10m 
      Work Description: kennknowles closed pull request #5597: [BEAM-4526] 
Suppress immutability warning caused by LoadingCache in enum instance
URL: https://github.com/apache/beam/pull/5597
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/BatchFlinkExecutableStageContext.java
 
b/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/BatchFlinkExecutableStageContext.java
index 3e1cf1e68e0..bd8b04687d8 100644
--- 
a/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/BatchFlinkExecutableStageContext.java
+++ 
b/runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/BatchFlinkExecutableStageContext.java
@@ -74,6 +74,7 @@ private void cleanUp() throws Exception {
   enum BatchFactory implements Factory {
     INSTANCE;
 
+    @SuppressWarnings("Immutable") // observably immutable
     private final LoadingCache<JobInfo, BatchFlinkExecutableStageContext> 
cachedContexts;
 
     BatchFactory() {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

    Worklog Id:     (was: 110380)
    Time Spent: 40m  (was: 0.5h)

> FlinkRunner failing errorprone due to mutable enum
> --------------------------------------------------
>
>                 Key: BEAM-4526
>                 URL: https://issues.apache.org/jira/browse/BEAM-4526
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-flink
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: Blocker
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> {code}
> runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/BatchFlinkExecutableStageContext.java:77:
>  warning: [ImmutableEnumChecker] enums should be immutable: 'BatchFactory' 
> has field 'cachedContexts' of type 
> 'com.google.common.cache.LoadingCache<org.apache.beam.runners.fnexecution.provisioning.JobInfo,org.apache.beam.runners.flink.translation.functions.BatchFlinkExecutableStageContext>',
>  the declaration of type 
> 'com.google.common.cache.LoadingCache<org.apache.beam.runners.fnexecution.provisioning.JobInfo,org.apache.beam.runners.flink.translation.functions.BatchFlinkExecutableStageContext>'
>  is not annotated with @com.google.errorprone.annotations.Immutable or 
> @javax.annotation.concurrent.Immutable
>     private final LoadingCache<JobInfo, BatchFlinkExecutableStageContext> 
> cachedContexts;
>                                                                           ^
>     (see http://errorprone.info/bugpattern/ImmutableEnumChecker)
> error: warnings found and -Werror specified
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to