diff --git a/spring-kafka/src/main/java/org/springframework/kafka/support/serializer/JsonDeserializer.java b/spring-kafka/src/main/java/org/springframework/kafka/support/serializer/JsonDeserializer.java index a86f1341f5..14b4a218bb 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/support/serializer/JsonDeserializer.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/support/serializer/JsonDeserializer.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * 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) { try { return deserReader.readValue(data); } - catch (IOException e) { - throw new SerializationException("Can't deserialize data [" + Arrays.toString(data) + - "] from topic [" + topic + "]", e); + catch (IOException ex) { + throw new SerializationException("Can't deserialize data from topic [" + topic + "]", ex); } }