langtools/test/tools/javac/failover/CheckAttributedTree.java
changeset 39601 5b37e511ae4b
parent 35359 f04501964016
child 40835 6ab9ed1abc46
equal deleted inserted replaced
39600:83ea7c12c164 39601:5b37e511ae4b
     1 /*
     1 /*
     2  * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2010, 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.
   309                 Iterable<? extends JavaFileObject> files = fileManager().getJavaFileObjects(file);
   309                 Iterable<? extends JavaFileObject> files = fileManager().getJavaFileObjects(file);
   310                 final List<Element> analyzedElems = new ArrayList<>();
   310                 final List<Element> analyzedElems = new ArrayList<>();
   311                 final List<CompilationUnitTree> trees = new ArrayList<>();
   311                 final List<CompilationUnitTree> trees = new ArrayList<>();
   312                 Iterable<? extends Element> elems = newCompilationTask()
   312                 Iterable<? extends Element> elems = newCompilationTask()
   313                     .withWriter(pw)
   313                     .withWriter(pw)
   314                         .withOption("-XDshouldStopPolicy=ATTR")
   314                         .withOption("-Xshouldstop:at=ATTR")
   315                         .withOption("-XDverboseCompilePolicy")
   315                         .withOption("-XDverboseCompilePolicy")
   316                         .withSource(files.iterator().next())
   316                         .withSource(files.iterator().next())
   317                         .withListener(new TaskListener() {
   317                         .withListener(new TaskListener() {
   318                             public void started(TaskEvent e) {
   318                             public void started(TaskEvent e) {
   319                                 if (e.getKind() == TaskEvent.Kind.ANALYZE)
   319                                 if (e.getKind() == TaskEvent.Kind.ANALYZE)