I got the same error – which is why I posted the comment to begin with. Here’s the reference I checked and it says nothing about charset being optional: http://docs.oracle.com/javase/7/docs/api/java/nio/file/Files.html#newBufferedReader(java.nio.file.Path, java.nio.charset.Charset)

Chad Killingsworth
Assistant Director of Web & New Media
Missouri State University

From: Nick Santos [mailto:notifications@github.com]
Sent: Friday, May 23, 2014 8:01 AM
To: google/closure-compiler
Cc: Killingsworth, Chad A
Subject: Re: [closure-compiler] Added a small inline tokenizer to deal with some issues regarding flag files (--flagfile) (#437)


In src/com/google/javascript/jscomp/CommandLineRunner.java:

> @@ -770,18 +772,59 @@ protected CommandLineRunner(String[] args, PrintStream out, PrintStream err) {

>

>    private void processFlagFile(PrintStream err)

>              throws CmdLineException, IOException {

> -    File flagFileInput = new File(flags.flagFile);

> -    List<String> argsInFile = tokenizeKeepingQuotedStrings(

> -        Files.readLines(flagFileInput, UTF_8));

> +    Path flagFile = Paths.get(flags.flagFile);

> +

> +    // Reads input as UTF-8 by default.

> +    BufferedReader buffer = java.nio.file.Files.newBufferedReader(flagFile);

can you post a link to the document that says that?

when i tried to compile this code, i got a compiler error

    [javac] c:\dev\git\closure-compiler\src\com\google\javascript\jscomp\Command

LineRunner.java:778: error: method newBufferedReader in class Files cannot be ap

plied to given types;

    [javac]     BufferedReader buffer = java.nio.file.Files.newBufferedReader(fl

agFile);

    [javac]                                                ^

    [javac]   required: Path,Charset

    [javac]   found: Path

    [javac]   reason: actual and formal argument lists differ in length

—
Reply to this email directly or view it on GitHub<https://github.com/google/closure-compiler/pull/437/files#r12997089>.