< prev index next >

test/runtime/verifier/OverriderMsg.java

Print this page




   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 import java.io.File;
  25 import java.io.FileOutputStream;
  26 import jdk.internal.org.objectweb.asm.ClassWriter;
  27 import jdk.internal.org.objectweb.asm.MethodVisitor;
  28 import static jdk.internal.org.objectweb.asm.Opcodes.*;
  29 import jdk.test.lib.*;

  30 
  31 /*
  32  * @test OverriderMsg
  33  * @bug 8026894
  34  * @library /testlibrary
  35  * @modules java.base/jdk.internal.org.objectweb.asm
  36  *          java.base/jdk.internal.misc
  37  *          java.management
  38  * @compile -XDignore.symbol.file OverriderMsg.java
  39  * @run main/othervm OverriderMsg
  40  */
  41 
  42 // This test checks that the super class name is included in the message when
  43 // a method is detected overriding a final method in its super class.  The
  44 // asm part of the test creates these two classes:
  45 //
  46 //     public class HasFinal {
  47 //         public final void m(String s) { }
  48 //     }
  49 //
  50 //     public class Overrider extends HasFinal {
  51 //         public void m(String s) { }
  52 //         public static void main(String[] args) { }
  53 //     }
  54 //




   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 import java.io.File;
  25 import java.io.FileOutputStream;
  26 import jdk.internal.org.objectweb.asm.ClassWriter;
  27 import jdk.internal.org.objectweb.asm.MethodVisitor;
  28 import static jdk.internal.org.objectweb.asm.Opcodes.*;
  29 import jdk.test.lib.process.ProcessTools;
  30 import jdk.test.lib.process.OutputAnalyzer;
  31 
  32 /*
  33  * @test OverriderMsg
  34  * @bug 8026894
  35  * @library /test/lib
  36  * @modules java.base/jdk.internal.org.objectweb.asm
  37  *          java.base/jdk.internal.misc
  38  *          java.management
  39  * @compile -XDignore.symbol.file OverriderMsg.java
  40  * @run main/othervm OverriderMsg
  41  */
  42 
  43 // This test checks that the super class name is included in the message when
  44 // a method is detected overriding a final method in its super class.  The
  45 // asm part of the test creates these two classes:
  46 //
  47 //     public class HasFinal {
  48 //         public final void m(String s) { }
  49 //     }
  50 //
  51 //     public class Overrider extends HasFinal {
  52 //         public void m(String s) { }
  53 //         public static void main(String[] args) { }
  54 //     }
  55 //


< prev index next >