< prev index next > test/jdk/java/lang/reflect/records/IsRecordTest.java
Print this page
/*
! * Copyright (c) 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.
/*
! * Copyright (c) 2020, 2024, 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.
* questions.
*/
/*
* @test
! * @bug 8255560
* @summary Class::isRecord should check that the current class is final and not abstract
* @modules java.base/jdk.internal.org.objectweb.asm
* @library /test/lib
* @run testng/othervm IsRecordTest
* @run testng/othervm/java.security.policy=allPermissions.policy IsRecordTest
*/
import java.io.IOException;
import java.io.UncheckedIOException;
* questions.
*/
/*
* @test
! * @bug 8255560 8326879
* @summary Class::isRecord should check that the current class is final and not abstract
* @modules java.base/jdk.internal.org.objectweb.asm
* @library /test/lib
* @run testng/othervm IsRecordTest
+ * @run testng/othervm --enable-preview IsRecordTest
* @run testng/othervm/java.security.policy=allPermissions.policy IsRecordTest
*/
import java.io.IOException;
import java.io.UncheckedIOException;
access = access | Opcodes.ACC_FINAL;
if (isAbstract)
access = access | Opcodes.ACC_ABSTRACT;
cw.visit(Opcodes.V16,
! access,
className,
null,
superName,
null);
access = access | Opcodes.ACC_FINAL;
if (isAbstract)
access = access | Opcodes.ACC_ABSTRACT;
cw.visit(Opcodes.V16,
! access | Opcodes.ACC_IDENTITY,
className,
null,
superName,
null);
< prev index next >