File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
sdk/greengrass/event-stream-rpc-model/src/main/java/software/amazon/awssdk/eventstreamrpc Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
package software .amazon .awssdk .eventstreamrpc ;
2
2
3
+ import java .util .Arrays ;
4
+
3
5
public class DeserializationException extends RuntimeException {
4
6
public DeserializationException (Object lexicalData ) {
5
7
this (lexicalData , null );
6
8
}
7
9
8
10
public DeserializationException (Object lexicalData , Throwable cause ) {
9
- super ("Could not deserialize data: [" + lexicalData .toString () + "]" , cause );
11
+ super ("Could not deserialize data: [" + stringify (lexicalData ) + "]" , cause );
12
+ }
13
+
14
+ private static String stringify (Object lexicalData ) {
15
+ if (lexicalData instanceof byte []) {
16
+ return Arrays .toString ((byte []) lexicalData );
17
+ }
18
+
19
+ return lexicalData .toString ();
10
20
}
11
21
}
You can’t perform that action at this time.
0 commit comments