This commit is contained in:
Dmitry Samersoff 2015-07-30 16:23:03 +00:00
commit f31a35e2ca

View File

@ -314,9 +314,8 @@ public final class Utils {
*/
public static String fileAsString(String filename) throws IOException {
Path filePath = Paths.get(filename);
return Files.exists(filePath)
? Files.lines(filePath).collect(Collectors.joining(NEW_LINE))
: null;
if (!Files.exists(filePath)) return null;
return new String(Files.readAllBytes(filePath));
}
/**