8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @summary Wrong classfile attribution in inner class of lambda expression.
27 * @bug 8010015
28 * @modules jdk.compiler/com.sun.tools.classfile
29 */
30
31 import java.lang.annotation.*;
32 import static java.lang.annotation.RetentionPolicy.*;
33 import static java.lang.annotation.ElementType.*;
34 import com.sun.tools.classfile.*;
35
36 /*
37 * A type-annotations on a field in an inner class not in a lambda expression
38 * results in RuntimeTypeAnnotations_attibute and RuntimeAnnotations_attribute.
39 * On a field in an innner class in a lambda expression, it leaves off the
40 * RuntimeAnnotations_attribute.
41 */
42 public class T8010015 extends ClassfileTestHelper{
43 public static void main(String[] args) throws Exception {
44 new T8010015().run();
45 }
46
47 public void run() throws Exception {
48 expected_tvisibles = 1;
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @summary Wrong classfile attribution in inner class of lambda expression.
27 * @bug 8010015
28 * @modules jdk.jdeps/com.sun.tools.classfile
29 */
30
31 import java.lang.annotation.*;
32 import static java.lang.annotation.RetentionPolicy.*;
33 import static java.lang.annotation.ElementType.*;
34 import com.sun.tools.classfile.*;
35
36 /*
37 * A type-annotations on a field in an inner class not in a lambda expression
38 * results in RuntimeTypeAnnotations_attibute and RuntimeAnnotations_attribute.
39 * On a field in an innner class in a lambda expression, it leaves off the
40 * RuntimeAnnotations_attribute.
41 */
42 public class T8010015 extends ClassfileTestHelper{
43 public static void main(String[] args) throws Exception {
44 new T8010015().run();
45 }
46
47 public void run() throws Exception {
48 expected_tvisibles = 1;
|