kennknowles commented on a change in pull request #14498:
URL: https://github.com/apache/beam/pull/14498#discussion_r610780330



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/metrics/MetricsEnvironment.java
##########
@@ -52,8 +53,8 @@
   private static final AtomicBoolean METRICS_SUPPORTED = new 
AtomicBoolean(false);
   private static final AtomicBoolean REPORTED_MISSING_CONTAINER = new 
AtomicBoolean(false);
 
-  private static final ThreadLocal<@Nullable MetricsContainer> 
CONTAINER_FOR_THREAD =
-      new ThreadLocal<>();
+  private static final ThreadLocal<@Nullable MetricsContainerHolder> 
CONTAINER_FOR_THREAD =

Review comment:
       Is it always no longer `@Nullable`? Could possible localize 
`@SuppressWarnings` to this initialization line? (just an idea)




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

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


Reply via email to