@Test public void testReadLines() throws IOException { List<String> lines = Arrays.asList("first", "second", "third"); File tmp = temporaryFolder.newFile(); Files.write(tmp.toPath(), String.join("\n", lines).getBytes()); DefaultInputFile testInputFile = TestUtils.createTestInputFile(temporaryFolder.getRoot(), tmp.getName(), StandardCharsets.UTF_8); assertThat(readLines(new JavaScriptFileImpl(testInputFile))).isEqualTo(lines); }
public static List<String> readLines(JavaScriptFile file) { try (BufferedReader reader = newBufferedReader(file)) { return reader.lines().collect(Collectors.toList()); } catch (IOException e) { throw new IllegalStateException("Unable to read file " + file.uri(), e); } }
CheckUtils { public static List<String> readLines(JavaScriptFile file) { try (BufferedReader reader = newBufferedReader(file)) { return reader.lines().collect(Collectors.toList()); } catch (IOException e) { throw new IllegalStateException("Unable to read file " + file.uri(), e); } } }
CheckUtils { public static List<String> readLines(JavaScriptFile file) { try (BufferedReader reader = newBufferedReader(file)) { return reader.lines().collect(Collectors.toList()); } catch (IOException e) { throw new IllegalStateException("Unable to read file " + file.uri(), e); } } private  CheckUtils(); }
CheckUtils { public static List<String> readLines(JavaScriptFile file) { try (BufferedReader reader = newBufferedReader(file)) { return reader.lines().collect(Collectors.toList()); } catch (IOException e) { throw new IllegalStateException("Unable to read file " + file.uri(), e); } } private  CheckUtils(); static String asString(Tree tree); static ExpressionTree removeParenthesis(ExpressionTree expressionTree); static Tree parentIgnoreParentheses(Tree tree); static ControlFlowGraph buildControlFlowGraph(Tree tree); static boolean isDescendant(Tree tree, Tree potentialParent); @Nullable static Tree getFirstAncestor(Tree tree, Kinds... kind); static List<String> readLines(JavaScriptFile file); }
CheckUtils { public static List<String> readLines(JavaScriptFile file) { try (BufferedReader reader = newBufferedReader(file)) { return reader.lines().collect(Collectors.toList()); } catch (IOException e) { throw new IllegalStateException("Unable to read file " + file.uri(), e); } } private  CheckUtils(); static String asString(Tree tree); static ExpressionTree removeParenthesis(ExpressionTree expressionTree); static Tree parentIgnoreParentheses(Tree tree); static ControlFlowGraph buildControlFlowGraph(Tree tree); static boolean isDescendant(Tree tree, Tree potentialParent); @Nullable static Tree getFirstAncestor(Tree tree, Kinds... kind); static List<String> readLines(JavaScriptFile file);  }