Skip to content

Commit

Permalink
Avoid string conversion in ExecutionContextSerializer tests
Browse files Browse the repository at this point in the history
Avoid the byte to string to byte conversion in
AbstractExecutionContextSerializerTests.
  • Loading branch information
marschall authored and fmbenhassine committed Sep 3, 2021
1 parent fce9a48 commit c9d827c
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -166,9 +166,7 @@ protected Map<String, Object> serializationRoundTrip(Map<String, Object> m1) thr
ByteArrayOutputStream out = new ByteArrayOutputStream();
getSerializer().serialize(m1, out);

String s = new String(out.toByteArray(), "ISO-8859-1");

InputStream in = new ByteArrayInputStream(s.getBytes("ISO-8859-1"));
InputStream in = new ByteArrayInputStream(out.toByteArray());
Map<String, Object> m2 = getSerializer().deserialize(in);
return m2;
}
Expand Down

0 comments on commit c9d827c

Please sign in to comment.