Skip to content

Commit 9d76bde

Browse files
authored
GH-2838: JSON Deser. Remove Verbose Exc. Message
Resolves #2838 Previously, the exception message contained the entire JSON content. **cherry pick to 3.0.x (#2839) and 2.9. (#2840)** I will add What's New? content to each branch after the merge.
1 parent 43650a4 commit 9d76bde

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

spring-kafka/src/main/java/org/springframework/kafka/support/serializer/JsonDeserializer.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2021 the original author or authors.
2+
* Copyright 2015-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -584,9 +584,8 @@ public T deserialize(String topic, Headers headers, byte[] data) {
584584
try {
585585
return deserReader.readValue(data);
586586
}
587-
catch (IOException e) {
588-
throw new SerializationException("Can't deserialize data [" + Arrays.toString(data) +
589-
"] from topic [" + topic + "]", e);
587+
catch (IOException ex) {
588+
throw new SerializationException("Can't deserialize data from topic [" + topic + "]", ex);
590589
}
591590
}
592591

0 commit comments

Comments
 (0)