11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /*
27 * @test
28 * @bug 8019486 8026861 8027142
29 * @summary javac, generates erroneous LVT for a test case with lambda code
30 * @library /tools/lib
31 * @modules jdk.compiler/com.sun.tools.classfile
32 * jdk.compiler/com.sun.tools.javac.api
33 * jdk.compiler/com.sun.tools.javac.file
34 * jdk.compiler/com.sun.tools.javac.main
35 * jdk.compiler/com.sun.tools.javac.util
36 * @build ToolBox
37 * @run main WrongLNTForLambdaTest
38 */
39
40 import java.io.File;
41 import java.nio.file.Paths;
42
43 import com.sun.tools.classfile.ClassFile;
44 import com.sun.tools.classfile.Code_attribute;
45 import com.sun.tools.classfile.LineNumberTable_attribute;
46 import com.sun.tools.classfile.Method;
47 import com.sun.tools.javac.util.Assert;
48
49 public class WrongLNTForLambdaTest {
50
51 static final String testSource =
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /*
27 * @test
28 * @bug 8019486 8026861 8027142
29 * @summary javac, generates erroneous LVT for a test case with lambda code
30 * @library /tools/lib
31 * @modules jdk.jdeps/com.sun.tools.classfile
32 * jdk.compiler/com.sun.tools.javac.api
33 * jdk.compiler/com.sun.tools.javac.file
34 * jdk.compiler/com.sun.tools.javac.main
35 * jdk.compiler/com.sun.tools.javac.util
36 * @build ToolBox
37 * @run main WrongLNTForLambdaTest
38 */
39
40 import java.io.File;
41 import java.nio.file.Paths;
42
43 import com.sun.tools.classfile.ClassFile;
44 import com.sun.tools.classfile.Code_attribute;
45 import com.sun.tools.classfile.LineNumberTable_attribute;
46 import com.sun.tools.classfile.Method;
47 import com.sun.tools.javac.util.Assert;
48
49 public class WrongLNTForLambdaTest {
50
51 static final String testSource =
|