< prev index next >

test/langtools/tools/javac/classfiles/attributes/Synthetic/BridgeMethodsForLambdaTest.java

Print this page
rev 58760 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: alanb, cjplummer, coleenp, dholmes, dlong, forax, jlahoda, psandoz, plevart, vromero
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com, jan.lahoda@oracle.com, amy.lu@oracle.com

*** 1,7 **** /* ! * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 21,31 **** * questions. */ /* * @test ! * @bug 8044537 8200301 * @summary Checking ACC_SYNTHETIC flag is generated for bridge method * generated for lambda expressions and method references. * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main * jdk.jdeps/com.sun.tools.classfile --- 21,31 ---- * questions. */ /* * @test ! * @bug 8044537 8200301 8238358 * @summary Checking ACC_SYNTHETIC flag is generated for bridge method * generated for lambda expressions and method references. * @modules jdk.compiler/com.sun.tools.javac.api * jdk.compiler/com.sun.tools.javac.main * jdk.jdeps/com.sun.tools.classfile
*** 42,63 **** /** * Synthetic members: * 1. inner class for Inner1. * 2. method for () -> {} in Inner1 * 3. method for () -> {} in Inner2 ! * 4. method references to private methods. ! * 5. method for super::function() ! * 6. method references to private static methods. ! * 7. access method for private method function(). ! * 8. access method for private static method staticFunction(). ! * 9. method reference to vararg method. ! * 10. method reference to array's method. ! * 11. constructors for Inner1 and Inner2. */ @ExpectedClass(className = "BridgeMethodsForLambdaTest", expectedMethods = {"<init>()", "<clinit>()", "function(java.lang.Integer[])"}, ! expectedNumberOfSyntheticMethods = 6) @ExpectedClass(className = "BridgeMethodsForLambdaTest$Inner1", expectedMethods = {"<init>(BridgeMethodsForLambdaTest)", "function()", "run()"}, expectedFields = "lambda1", expectedNumberOfSyntheticMethods = 1, expectedNumberOfSyntheticFields = 1) --- 42,59 ---- /** * Synthetic members: * 1. inner class for Inner1. * 2. method for () -> {} in Inner1 * 3. method for () -> {} in Inner2 ! * 4. method for super::function() ! * 5. method reference to vararg method. ! * 6. method reference to array's method. ! * 7. constructors for Inner1 and Inner2. */ @ExpectedClass(className = "BridgeMethodsForLambdaTest", expectedMethods = {"<init>()", "<clinit>()", "function(java.lang.Integer[])"}, ! expectedNumberOfSyntheticMethods = 3) @ExpectedClass(className = "BridgeMethodsForLambdaTest$Inner1", expectedMethods = {"<init>(BridgeMethodsForLambdaTest)", "function()", "run()"}, expectedFields = "lambda1", expectedNumberOfSyntheticMethods = 1, expectedNumberOfSyntheticFields = 1)
< prev index next >