langtools/test/tools/javac/api/T6412669.java
changeset 40308 274367a99f98
parent 36526 3b41f1c69604
equal deleted inserted replaced
40306:1a0fcaf3f2ed 40308:274367a99f98
     1 /*
     1 /*
     2  * Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2006, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    52             Iterable<? extends JavaFileObject> files =
    52             Iterable<? extends JavaFileObject> files =
    53                 fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, T6412669.class.getName()+".java")));
    53                 fm.getJavaFileObjectsFromFiles(Arrays.asList(new File(testSrc, T6412669.class.getName()+".java")));
    54             String[] opts = {
    54             String[] opts = {
    55                 "-proc:only",
    55                 "-proc:only",
    56                 "-processor", T6412669.class.getName(),
    56                 "-processor", T6412669.class.getName(),
    57                 "-XaddExports:jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
    57                 "--add-exports", "jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
    58             };
    58             };
    59             StringWriter sw = new StringWriter();
    59             StringWriter sw = new StringWriter();
    60             JavacTask task = tool.getTask(sw, fm, null, Arrays.asList(opts), null, files);
    60             JavacTask task = tool.getTask(sw, fm, null, Arrays.asList(opts), null, files);
    61             boolean ok = task.call();
    61             boolean ok = task.call();
    62             String out = sw.toString();
    62             String out = sw.toString();