test/tools/javac/api/T6306137.java

Print this page

        

*** 74,84 **** Files.write(testFile.toPath(), scratch, Charset.forName("UTF-8"), CREATE, TRUNCATE_EXISTING); } void test(String encoding, boolean good) { error = false; ! Iterable<String> args = Arrays.asList("-source", "6", "-encoding", encoding, "-d", "."); compiler.getTask(null, fm, dl, args, null, files).call(); if (error == good) { if (error) { throw new AssertionError("Error reported"); } else { --- 74,84 ---- Files.write(testFile.toPath(), scratch, Charset.forName("UTF-8"), CREATE, TRUNCATE_EXISTING); } void test(String encoding, boolean good) { error = false; ! Iterable<String> args = Arrays.asList("-encoding", encoding, "-d", "."); compiler.getTask(null, fm, dl, args, null, files).call(); if (error == good) { if (error) { throw new AssertionError("Error reported"); } else {