leventov commented on a change in pull request #8558: 7227 : Prohibit Non Final Static Field URL: https://github.com/apache/incubator-druid/pull/8558#discussion_r335591115
########## File path: extensions-core/lookups-cached-global/src/test/java/org/apache/druid/query/lookup/namespace/StaticMapExtractionNamespaceTest.java ########## @@ -32,6 +32,8 @@ { private static final Map<String, String> MAP = ImmutableMap.<String, String>builder().put("foo", "bar").build(); private static final ObjectMapper MAPPER = new DefaultObjectMapper(); + + @SuppressWarnings("SSBasedInspection") // static field(s) cannot be final because set in an initializer block private static String MAP_STRING; Review comment: Seems like `setUpStatic()` actually could be inlined: ```java private static final String MAP_STRING = MAPPER.writeValueAsString(MAP); ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@druid.apache.org For additional commands, e-mail: commits-h...@druid.apache.org