Skip to content

Commit

Permalink
Suppress new Sonar smells
Browse files Browse the repository at this point in the history
  • Loading branch information
artembilan committed Oct 21, 2019
1 parent 633f566 commit 5bd49b3
Showing 1 changed file with 4 additions and 7 deletions.
Expand Up @@ -1254,7 +1254,7 @@ private List<ConsumerRecord<K, V>> createRecordList(final ConsumerRecords<K, V>
* @return an exception.
* @throws Error an error.
*/
private RuntimeException doInvokeBatchListener(final ConsumerRecords<K, V> records,
private RuntimeException doInvokeBatchListener(final ConsumerRecords<K, V> records, // NOSONAR
List<ConsumerRecord<K, V>> recordList, @SuppressWarnings(RAW_TYPES) Producer producer) {

Object sample = startMicrometerSample();
Expand All @@ -1275,9 +1275,7 @@ private RuntimeException doInvokeBatchListener(final ConsumerRecords<K, V> recor
invokeBatchErrorHandler(records, e);
// unlikely, but possible, that a batch error handler "handles" the error
if ((!acked && !this.autoCommit && this.batchErrorHandler.isAckAfterHandle()) || producer != null) {
if (!acked) {
this.acks.addAll(getHighestOffsetRecords(records));
}
this.acks.addAll(getHighestOffsetRecords(records));
if (producer != null) {
sendOffsetsToTransaction(producer);
}
Expand Down Expand Up @@ -1527,9 +1525,8 @@ private void handleNack(final ConsumerRecords<K, V> records, final ConsumerRecor
* @return an exception.
* @throws Error an error.
*/
private RuntimeException doInvokeRecordListener(final ConsumerRecord<K, V> record,
@SuppressWarnings(RAW_TYPES) Producer producer,
Iterator<ConsumerRecord<K, V>> iterator) {
private RuntimeException doInvokeRecordListener(final ConsumerRecord<K, V> record, // NOSONAR
@SuppressWarnings(RAW_TYPES) Producer producer, Iterator<ConsumerRecord<K, V>> iterator) {

Object sample = startMicrometerSample();

Expand Down

0 comments on commit 5bd49b3

Please sign in to comment.