Skip to content

Commit 9649a9f

Browse files
committed
Generics cleanup in test
* Cleaning up unnecessary generics in `RecoveringDeserializationExceptionHandlerTests`
1 parent 2db5e95 commit 9649a9f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

spring-kafka/src/test/java/org/springframework/kafka/streams/RecoveringDeserializationExceptionHandlerTests.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ void viaStringProperty() {
9292
Recoverer.class.getName());
9393
handler.configure(configs);
9494
assertThat(KafkaTestUtils.getPropertyValue(handler, "recoverer")).isInstanceOf(Recoverer.class);
95-
assertThat(handler.handle(null, new ConsumerRecord<byte[], byte[]>("foo", 0, 0, null, null),
95+
assertThat(handler.handle(null, new ConsumerRecord<>("foo", 0, 0, null, null),
9696
new IllegalArgumentException())).isEqualTo(DeserializationHandlerResponse.CONTINUE);
97-
assertThat(handler.handle(null, new ConsumerRecord<byte[], byte[]>("foo", 0, 0, null, null),
97+
assertThat(handler.handle(null, new ConsumerRecord<>("foo", 0, 0, null, null),
9898
new IllegalStateException())).isEqualTo(DeserializationHandlerResponse.FAIL);
9999
}
100100

@@ -105,30 +105,30 @@ void viaClassProperty() {
105105
configs.put(RecoveringDeserializationExceptionHandler.KSTREAM_DESERIALIZATION_RECOVERER, Recoverer.class);
106106
handler.configure(configs);
107107
assertThat(KafkaTestUtils.getPropertyValue(handler, "recoverer")).isInstanceOf(Recoverer.class);
108-
assertThat(handler.handle(null, new ConsumerRecord<byte[], byte[]>("foo", 0, 0, null, null),
108+
assertThat(handler.handle(null, new ConsumerRecord<>("foo", 0, 0, null, null),
109109
new IllegalArgumentException())).isEqualTo(DeserializationHandlerResponse.CONTINUE);
110-
assertThat(handler.handle(null, new ConsumerRecord<byte[], byte[]>("foo", 0, 0, null, null),
110+
assertThat(handler.handle(null, new ConsumerRecord<>("foo", 0, 0, null, null),
111111
new IllegalStateException())).isEqualTo(DeserializationHandlerResponse.FAIL);
112112
}
113113

114114
@Test
115115
void viaObjectProperty() {
116116
RecoveringDeserializationExceptionHandler handler = new RecoveringDeserializationExceptionHandler();
117-
Map<String, Object> configs = new HashMap<String, Object>();
117+
Map<String, Object> configs = new HashMap<>();
118118
Recoverer rec = new Recoverer();
119119
configs.put(RecoveringDeserializationExceptionHandler.KSTREAM_DESERIALIZATION_RECOVERER, rec);
120120
handler.configure(configs);
121121
assertThat(KafkaTestUtils.getPropertyValue(handler, "recoverer")).isSameAs(rec);
122-
assertThat(handler.handle(null, new ConsumerRecord<byte[], byte[]>("foo", 0, 0, null, null),
122+
assertThat(handler.handle(null, new ConsumerRecord<>("foo", 0, 0, null, null),
123123
new IllegalArgumentException())).isEqualTo(DeserializationHandlerResponse.CONTINUE);
124-
assertThat(handler.handle(null, new ConsumerRecord<byte[], byte[]>("foo", 0, 0, null, null),
124+
assertThat(handler.handle(null, new ConsumerRecord<>("foo", 0, 0, null, null),
125125
new IllegalStateException())).isEqualTo(DeserializationHandlerResponse.FAIL);
126126
}
127127

128128
@Test
129129
void withNoRecoverer() {
130130
RecoveringDeserializationExceptionHandler handler = new RecoveringDeserializationExceptionHandler();
131-
assertThat(handler.handle(null, new ConsumerRecord<byte[], byte[]>("foo", 0, 0, null, null),
131+
assertThat(handler.handle(null, new ConsumerRecord<>("foo", 0, 0, null, null),
132132
new IllegalArgumentException())).isEqualTo(DeserializationHandlerResponse.FAIL);
133133
}
134134

0 commit comments

Comments
 (0)