langtools/test/tools/javac/defaultMethodsVisibility/DefaultMethodsNotVisibleForSourceLessThan8Test.java
author ssides
Wed, 09 Jul 2014 15:14:06 +0400
changeset 25760 7955db32d6b0
parent 23105 1d1ea26a10ae
child 25445 603f0c93d5c9
permissions -rw-r--r--
8046597: fix doclint issues in swing classes, part 4 of 4 Reviewed-by: pchelko
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     1
/*
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
     2
 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     4
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     7
 * published by the Free Software Foundation.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     8
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    13
 * accompanied this code).
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    14
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    18
 *
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    21
 * questions.
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    22
 */
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    23
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    24
/*
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    25
 * @test
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    26
 * @bug 8029240 8030855
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    27
 * @summary Default methods not always visible under -source 7
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    28
 * Default methods should be visible under source previous to 8
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    29
 * @library /tools/javac/lib
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    30
 * @build ToolBox
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    31
 * @run main DefaultMethodsNotVisibleForSourceLessThan8Test
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    32
 */
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    33
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    34
import java.nio.file.Files;
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    35
import java.nio.file.Paths;
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    36
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    37
public class DefaultMethodsNotVisibleForSourceLessThan8Test {
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    38
    // common definitions
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    39
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    40
    // this one should be compiled with source 8, the rest with source < 8
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    41
    static final String ISrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    42
        "interface I {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    43
        "    default void m() {}\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    44
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    45
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    46
    static final String JSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    47
        "interface J extends I {}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    48
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    49
    static final String ASrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    50
        "abstract class A implements I {}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    51
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    52
    static final String BSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    53
        "class B implements I {}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    54
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    55
    // test legacy implementations
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    56
    static final String C1Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    57
        "class C1 implements I {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    58
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    59
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    60
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    61
    static final String C2Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    62
        "class C2 implements J {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    63
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    64
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    65
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    66
    static final String C3Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    67
        "class C3 extends A {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    68
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    69
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    70
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    71
    static final String C4Src =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    72
        "class C4 extends B {\n" +
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
    73
        "    public void m() {}\n" +
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    74
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    75
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    76
    //test legacy invocations
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    77
    static final String LegacyInvocationSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    78
        "class LegacyInvocation {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    79
        "    public static void test(I i, J j, A a, B b) {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    80
        "        i.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    81
        "        j.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    82
        "        a.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    83
        "        b.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    84
        "    }\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    85
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    86
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    87
    //test case super invocations
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    88
    static final String SubASrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    89
        "class SubA extends A {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    90
        "    public void test() {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    91
        "        super.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    92
        "    }\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    93
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    94
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    95
    static final String SubBSrc =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    96
        "class SubB extends B {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    97
        "    public void test() {\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    98
        "        super.m();\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
    99
        "    }\n" +
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   100
        "}";
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   101
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   102
    public static void main(String[] args) throws Exception {
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   103
        String[] sources = new String[] {
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   104
            "1.2",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   105
            "1.3",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   106
            "1.4",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   107
            "1.5",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   108
            "1.6",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   109
            "1.7",
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   110
        };
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   111
        for (String source : sources) {
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   112
            new DefaultMethodsNotVisibleForSourceLessThan8Test().run(source);
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   113
        }
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   114
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   115
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   116
    String outDir;
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   117
    String source;
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   118
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   119
    void run(String source) throws Exception {
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   120
        this.source = source;
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   121
        outDir = "out" + source.replace('.', '_');
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   122
        testsPreparation();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   123
        testLegacyImplementations();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   124
        testLegacyInvocations();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   125
        testSuperInvocations();
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   126
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   127
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   128
    void testsPreparation() throws Exception {
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   129
        Files.createDirectory(Paths.get(outDir));
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   130
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   131
        /* as an extra check let's make sure that interface 'I' can't be compiled
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   132
         * with source < 8
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   133
         */
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   134
        ToolBox.JavaToolArgs javacArgs =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   135
                new ToolBox.JavaToolArgs(ToolBox.Expect.FAIL)
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   136
                .setOptions("-d", outDir, "-source", source)
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   137
                .setSources(ISrc);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   138
        ToolBox.javac(javacArgs);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   139
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   140
        //but it should compile with source >= 8
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   141
        javacArgs =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   142
                new ToolBox.JavaToolArgs()
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   143
                .setOptions("-d", outDir)
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   144
                .setSources(ISrc);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   145
        ToolBox.javac(javacArgs);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   146
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   147
        javacArgs =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   148
                new ToolBox.JavaToolArgs()
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   149
                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   150
                .setSources(JSrc, ASrc, BSrc);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   151
        ToolBox.javac(javacArgs);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   152
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   153
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   154
    void testLegacyImplementations() throws Exception {
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   155
        //compile C1-4
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   156
        ToolBox.JavaToolArgs javacArgs =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   157
                new ToolBox.JavaToolArgs()
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   158
                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   159
                .setSources(C1Src, C2Src, C3Src, C4Src);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   160
        ToolBox.javac(javacArgs);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   161
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   162
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   163
    void testLegacyInvocations() throws Exception {
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   164
        //compile LegacyInvocation
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   165
        ToolBox.JavaToolArgs javacArgs =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   166
                new ToolBox.JavaToolArgs()
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   167
                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   168
                .setSources(LegacyInvocationSrc);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   169
        ToolBox.javac(javacArgs);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   170
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   171
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   172
    void testSuperInvocations() throws Exception {
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   173
        //compile SubA, SubB
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   174
        ToolBox.JavaToolArgs javacArgs =
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   175
                new ToolBox.JavaToolArgs()
23105
1d1ea26a10ae 8030855: Default methods should be visible under source previous to 8
vromero
parents: 22167
diff changeset
   176
                .setOptions("-cp", outDir, "-d", outDir, "-source", source)
22167
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   177
                .setSources(SubASrc, SubBSrc);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   178
        ToolBox.javac(javacArgs);
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   179
    }
e0ba35f27975 8029240: Default methods not always visible under -source 7
vromero
parents:
diff changeset
   180
}