@@ -1254,7 +1254,7 @@ private List<ConsumerRecord<K, V>> createRecordList(final ConsumerRecords<K, V>
12541254 * @return an exception.
12551255 * @throws Error an error.
12561256 */
1257- private RuntimeException doInvokeBatchListener (final ConsumerRecords <K , V > records ,
1257+ private RuntimeException doInvokeBatchListener (final ConsumerRecords <K , V > records , // NOSONAR
12581258 List <ConsumerRecord <K , V >> recordList , @ SuppressWarnings (RAW_TYPES ) Producer producer ) {
12591259
12601260 Object sample = startMicrometerSample ();
@@ -1275,9 +1275,7 @@ private RuntimeException doInvokeBatchListener(final ConsumerRecords<K, V> recor
12751275 invokeBatchErrorHandler (records , e );
12761276 // unlikely, but possible, that a batch error handler "handles" the error
12771277 if ((!acked && !this .autoCommit && this .batchErrorHandler .isAckAfterHandle ()) || producer != null ) {
1278- if (!acked ) {
1279- this .acks .addAll (getHighestOffsetRecords (records ));
1280- }
1278+ this .acks .addAll (getHighestOffsetRecords (records ));
12811279 if (producer != null ) {
12821280 sendOffsetsToTransaction (producer );
12831281 }
@@ -1527,9 +1525,8 @@ private void handleNack(final ConsumerRecords<K, V> records, final ConsumerRecor
15271525 * @return an exception.
15281526 * @throws Error an error.
15291527 */
1530- private RuntimeException doInvokeRecordListener (final ConsumerRecord <K , V > record ,
1531- @ SuppressWarnings (RAW_TYPES ) Producer producer ,
1532- Iterator <ConsumerRecord <K , V >> iterator ) {
1528+ private RuntimeException doInvokeRecordListener (final ConsumerRecord <K , V > record , // NOSONAR
1529+ @ SuppressWarnings (RAW_TYPES ) Producer producer , Iterator <ConsumerRecord <K , V >> iterator ) {
15331530
15341531 Object sample = startMicrometerSample ();
15351532
0 commit comments