Skip to content

Commit a63755b

Browse files
committed
Use Files.readString where appropriate
1 parent 53f4912 commit a63755b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/json/JsonFileItemWriterFunctionalTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 the original author or authors.
2+
* Copyright 2018-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -334,7 +334,7 @@ private void assertFileEquals(File expected, File actual) throws Exception {
334334
}
335335

336336
private String getContent(File file) throws IOException {
337-
return new String(Files.readAllBytes(file.toPath()), Charset.defaultCharset());
337+
return Files.readString(file.toPath(), Charset.defaultCharset());
338338
}
339339

340340
}

0 commit comments

Comments
 (0)