Skip to content

Commit e579c62

Browse files
committed
Fix for Java 8 compatibility
1 parent dd981e1 commit e579c62

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-kafka/src/main/java/org/springframework/kafka/listener/CommonDelegatingErrorHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.kafka.listener;
1818

19+
import java.util.AbstractMap;
1920
import java.util.HashMap;
2021
import java.util.LinkedHashMap;
2122
import java.util.List;
@@ -76,7 +77,7 @@ public void setErrorHandlers(Map<Class<? extends Throwable>, CommonErrorHandler>
7677

7778
private void updateClassifier(Map<Class<? extends Throwable>, CommonErrorHandler> delegates) {
7879
Map<Class<? extends Throwable>, Boolean> classifications = delegates.keySet().stream()
79-
.map(commonErrorHandler -> Map.entry(commonErrorHandler, true))
80+
.map(commonErrorHandler -> new AbstractMap.SimpleEntry<>(commonErrorHandler, true))
8081
.collect(Collectors.toMap(Entry::getKey, Entry::getValue));
8182
this.classifier = new BinaryExceptionClassifier(classifications);
8283
}

0 commit comments

Comments
 (0)