Skip to content

Commit c9d827c

Browse files
marschallfmbenhassine
authored andcommitted
Avoid string conversion in ExecutionContextSerializer tests
Avoid the byte to string to byte conversion in AbstractExecutionContextSerializerTests.
1 parent fce9a48 commit c9d827c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

spring-batch-core/src/test/java/org/springframework/batch/core/repository/dao/AbstractExecutionContextSerializerTests.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ protected Map<String, Object> serializationRoundTrip(Map<String, Object> m1) thr
166166
ByteArrayOutputStream out = new ByteArrayOutputStream();
167167
getSerializer().serialize(m1, out);
168168

169-
String s = new String(out.toByteArray(), "ISO-8859-1");
170-
171-
InputStream in = new ByteArrayInputStream(s.getBytes("ISO-8859-1"));
169+
InputStream in = new ByteArrayInputStream(out.toByteArray());
172170
Map<String, Object> m2 = getSerializer().deserialize(in);
173171
return m2;
174172
}

0 commit comments

Comments
 (0)