Skip to content

Commit 38390e8

Browse files
committed
Restore generic args for anonymous classes
https://build.spring.io/browse/SK-K25X-123/
1 parent c4787fc commit 38390e8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-kafka/src/test/java/org/springframework/kafka/core/KafkaTemplateTests.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ public class KafkaTemplateTests {
102102

103103
private static Consumer<Integer, String> consumer;
104104

105-
private static final ProducerFactory.Listener<String, String> noopListener = new ProducerFactory.Listener<>() {
105+
private static final ProducerFactory.Listener<String, String> noopListener =
106+
new ProducerFactory.Listener<String, String>() {
106107

107108
@Override
108109
public void producerAdded(String id, Producer<String, String> producer) {
@@ -357,7 +358,7 @@ void testWithCallback() throws Exception {
357358
template.flush();
358359
final CountDownLatch latch = new CountDownLatch(1);
359360
final AtomicReference<SendResult<Integer, String>> theResult = new AtomicReference<>();
360-
future.addCallback(new ListenableFutureCallback<>() {
361+
future.addCallback(new ListenableFutureCallback<SendResult<Integer, String>>() {
361362

362363
@Override
363364
public void onSuccess(SendResult<Integer, String> result) {
@@ -391,7 +392,7 @@ void testWithCallbackFailure() throws Exception {
391392
final CountDownLatch latch = new CountDownLatch(1);
392393
final AtomicReference<SendResult<Integer, String>> theResult = new AtomicReference<>();
393394
AtomicReference<String> value = new AtomicReference<>();
394-
future.addCallback(new KafkaSendCallback<>() {
395+
future.addCallback(new KafkaSendCallback<Integer, String>() {
395396

396397
@Override
397398
public void onSuccess(SendResult<Integer, String> result) {
@@ -499,7 +500,7 @@ void testConfigOverridesWithDefaultKafkaProducerFactory() {
499500
@Test
500501
void testConfigOverridesWithCustomProducerFactory() {
501502
Map<String, Object> senderProps = KafkaTestUtils.producerProps(embeddedKafka);
502-
ProducerFactory<String, String> pf = new ProducerFactory<>() {
503+
ProducerFactory<String, String> pf = new ProducerFactory<String, String>() {
503504

504505
@Override
505506
public Producer<String, String> createProducer() {

spring-kafka/src/test/java/org/springframework/kafka/core/reactive/ReactiveKafkaProducerTemplateIntegrationTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ public void shouldFlushRecordsOnDemand() {
408408
Mono<Void> sendWithFlushMono = reactiveKafkaProducerTemplate
409409
.send(Mono.just(SenderRecord
410410
.create(new ProducerRecord<>(REACTIVE_INT_KEY_TOPIC, DEFAULT_KEY, DEFAULT_VALUE), null)))
411-
.then(reactiveKafkaProducerTemplate.flush())
412411
.then();
413412

414413
StepVerifier.create(sendWithFlushMono)

0 commit comments

Comments
 (0)