AndreLouisCaron commented on a change in pull request #320: Fix issues reported by SpotBugs in ElasticSearch sink URL: https://github.com/apache/flume/pull/320#discussion_r398988243
########## File path: flume-ng-sinks/flume-ng-elasticsearch-sink/src/main/java/org/apache/flume/sink/elasticsearch/ElasticSearchSink.java ########## @@ -331,13 +330,8 @@ public void configure(Context context) { indexNameBuilder = clazz.newInstance(); indexnameBuilderContext.put(INDEX_NAME, indexName); indexNameBuilder.configure(indexnameBuilderContext); - } catch (Exception e) { - logger.error("Could not instantiate index name builder.", e); - Throwables.propagate(e); - } - - if (sinkCounter == null) { - sinkCounter = new SinkCounter(getName()); Review comment: Note to reviewers: SportBugs was reporting `CN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE` because `sinkCounter` is instantiated twice. ---------------------------------------------------------------- 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