langtools/test/tools/javac/7129225/TestImportStar.java
author sogoel
Thu, 05 Jun 2014 10:57:10 -0700
changeset 24797 850ebd4d80a7
parent 15385 ee1eebe7e210
child 27119 b80b6a2e137f
permissions -rw-r--r--
8044072: Group 2: create .out files for OverrideChecks tests in tools/javac dir Reviewed-by: jjg
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11709
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     1
/*
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14963
diff changeset
     2
 * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
11709
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     4
 *
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    10
 *
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    15
 * accompanied this code).
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    16
 *
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    20
 *
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    23
 * questions.
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    24
 */
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    25
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    26
/* @test
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    27
 * @bug 7129225
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    28
 * @summary import xxx.* isn't handled correctly by annotation processing
14963
974d4423c999 8005282: Use @library tag with non-relative path for javac tests
darcy
parents: 11710
diff changeset
    29
 * @library /tools/javac/lib
11710
f435448e40fc 7133314: The regression test for 7129225 fails when run with jtreg -samevm or jtreg -agentvm
jjh
parents: 11709
diff changeset
    30
 * @build JavacTestingAbstractProcessor
11709
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    31
 * @compile/fail/ref=NegTest.ref -XDrawDiagnostics TestImportStar.java
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    32
 * @compile Anno.java AnnoProcessor.java
15385
ee1eebe7e210 8006775: JSR 308: Compiler changes in JDK8
jjg
parents: 14963
diff changeset
    33
 * @compile/fail/ref=TestImportStar.ref -XDrawDiagnostics -processor AnnoProcessor -proc:only TestImportStar.java
11709
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    34
 */
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    35
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    36
 //The @compile/fail... verifies that the fix doesn't break the normal compilation of import xxx.*
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    37
 //The @comple/ref... verifies the fix fixes the bug
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    38
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    39
import xxx.*;
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    40
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    41
@Anno
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    42
public class TestImportStar {
0d56d3fc22e6 7129225: javac fails to run annotation processors when star import of package of gensrc
jjh
parents:
diff changeset
    43
}