InvalidDefaultInterface.java revision 3294:9adfb22ff08f
1263320Sdim/*
2263320Sdim * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
3263320Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4263320Sdim *
5263320Sdim * This code is free software; you can redistribute it and/or modify it
6263320Sdim * under the terms of the GNU General Public License version 2 only, as
7263320Sdim * published by the Free Software Foundation.
8269012Semaste *
9263320Sdim * This code is distributed in the hope that it will be useful, but WITHOUT
10263320Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11263320Sdim * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12263320Sdim * version 2 for more details (a copy is included in the LICENSE file that
13263320Sdim * accompanied this code).
14263320Sdim *
15263320Sdim * You should have received a copy of the GNU General Public License version
16263320Sdim * 2 along with this work; if not, write to the Free Software Foundation,
17263320Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18263320Sdim *
19263320Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20263320Sdim * or visit www.oracle.com if you need additional information or have any
21263320Sdim * questions.
22263320Sdim */
23263320Sdim
24263320Sdim// key: compiler.misc.invalid.default.interface
25263320Sdim// key: compiler.misc.bad.class.file.header
26263320Sdim// key: compiler.err.cant.access
27263320Sdim// options: -processor CreateBadClassFile
28263320Sdim// run: exec -XaddExports:jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
29263320Sdim
30263320Sdim/* The annotation processor will create an invalid classfile with version 51.0
31263320Sdim * and a non-abstract method in an interface. Loading the classfile will produce
32263320Sdim * the diagnostic.
33263320Sdim */
34263320Sdimclass InvalidDefaultInterface { }
35263320Sdim