Skip to content

Commit

Permalink
spring-projectsGH-2838: JSON Deser. Remove Verbose Exc. Message
Browse files Browse the repository at this point in the history
Resolves spring-projects#2838

Previously, the exception message contained the entire JSON content.

**cherry pick to 3.0.x (spring-projects#2839) and 2.9. (spring-projects#2840)**

I will add What's New? content to each branch after the merge.
  • Loading branch information
garyrussell committed Oct 11, 2023
1 parent 43650a4 commit 1d7c6f9
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 1d7c6f9

Please sign in to comment.