Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8246774: implement Record Classes as a standard feature in Java #290

Closed
@@ -23,14 +23,14 @@

/*
* @test
* @bug 8246774
* @library /test/lib
* @summary Test that a class that is a record can be redefined.
* @modules java.base/jdk.internal.misc
* @modules java.instrument
* jdk.jartool/sun.tools.jar
* @requires vm.jvmti
* @compile RedefineRecord.java
* @run main/othervm RedefineRecord buildagent
* @run main RedefineRecord buildagent
* @run main/othervm/timeout=6000 RedefineRecord runtest
*/

@@ -23,6 +23,7 @@

/*
* @test
* @bug 8246774
* @summary test logging of reasons for ignoring Record attribute
* @library /test/lib
* @compile superNotJLRecord.jcod recordIgnoredVersion.jcod
@@ -23,10 +23,10 @@

/*
* @test
* @bug 8246774
* @compile abstractRecord.jcod notFinalRecord.jcod oldRecordAttribute.jcod superNotJLRecord.jcod
* @compile shortRecordAttribute.jcod twoRecordAttributes.jcod badRecordAttribute.jcod
*
* @run main/othervm recordAttributeTest
* @run main recordAttributeTest
*/


@@ -23,7 +23,8 @@

/*
* @test
* @run main/othervm recordReflectionTest
* @bug 8246774
* @summary testing reflection APIs for record classes
*/


@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Checks that the appropriate default value is given to the canonical ctr
* @run testng/othervm AbsentStreamValuesTest
* @run testng AbsentStreamValuesTest
* @run testng/othervm/java.security.policy=empty_security.policy AbsentStreamValuesTest
*/

@@ -23,11 +23,12 @@

/*
* @test
* @bug 8246774
* @summary InvalidClassException is thrown when the canonical constructor
* cannot be found during deserialization.
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* @run testng/othervm BadCanonicalCtrTest
* @run testng BadCanonicalCtrTest
*/

import java.io.ByteArrayInputStream;
@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Basic test that serializes and deserializes a number of records
* @run testng/othervm BasicRecordSer
* @run testng BasicRecordSer
* @run testng/othervm/java.security.policy=empty_security.policy BasicRecordSer
*/

@@ -23,9 +23,10 @@

/*
* @test
* @bug 8246774
* @summary Ensures that the serialization implementation can *always* access
* the record constructor
* @run testng/othervm ConstructorAccessTest
* @run testng ConstructorAccessTest
* @run testng/othervm/java.security.policy=empty_security.policy ConstructorAccessTest
*/

@@ -23,6 +23,7 @@

/*
* @test
* @bug 8246774
* @summary Verifies that privileged operations performed in the record
* constructor throw, when run without the required permissions
* @run testng/othervm/java.security.policy=empty_security.policy ConstructorPermissionTest
@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Ensures basic behavior of cycles from record components
* @run testng/othervm CycleTest
* @run testng CycleTest
* @run testng/othervm/java.security.policy=empty_security.policy CycleTest
*/

@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Checks that the appropriate value is given to the canonical ctr
* @run testng/othervm DifferentStreamFieldsTest
* @run testng DifferentStreamFieldsTest
* @run testng/othervm/java.security.policy=empty_security.policy DifferentStreamFieldsTest
*/

@@ -23,10 +23,11 @@

/*
* @test
* @bug 8246774
* @summary Basic tests for prohibited magic serialization methods
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* @run testng/othervm ProhibitedMethods
* @run testng ProhibitedMethods
*/

import java.io.ByteArrayInputStream;
@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Basic tests for readResolve
* @run testng/othervm ReadResolveTest
* @run testng ReadResolveTest
* @run testng/othervm/java.security.policy=empty_security.policy ReadResolveTest
*/

@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Basic tests for serializing and deserializing record classes
* @run testng/othervm RecordClassTest
* @run testng RecordClassTest
* @run testng/othervm/java.security.policy=empty_security.policy RecordClassTest
*/

@@ -23,10 +23,11 @@

/*
* @test
* @bug 8246774
* @summary Basic tests for prohibited magic serialPersistentFields
* @library /test/lib
* @modules java.base/jdk.internal.org.objectweb.asm
* @run testng/othervm SerialPersistentFieldsTest
* @run testng SerialPersistentFieldsTest
*/

import java.io.ByteArrayInputStream;
@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Basic tests for SUID in the serial stream
* @run testng/othervm SerialVersionUIDTest
* @run testng SerialVersionUIDTest
* @run testng/othervm/java.security.policy=empty_security.policy SerialVersionUIDTest
*/

@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Tests for stream references
* @run testng/othervm StreamRefTest
* @run testng StreamRefTest
*/

import java.io.ByteArrayInputStream;
@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Tests constructor invocation exceptions are handled appropriately
* @run testng/othervm ThrowingConstructorTest
* @run testng ThrowingConstructorTest
* @run testng/othervm/java.security.policy=empty_security.policy ThrowingConstructorTest
*/

@@ -23,9 +23,9 @@

/*
* @test
* @bug 8238763
* @bug 8238763 8246774
* @summary ObjectInputStream readUnshared method handling of Records
* @run testng/othervm UnsharedTest
* @run testng UnsharedTest
*/

import java.io.ByteArrayInputStream;
@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Basic tests for writeReplace
* @run testng/othervm WriteReplaceTest
* @run testng WriteReplaceTest
* @run testng/othervm/java.security.policy=empty_security.policy WriteReplaceTest
*/

@@ -23,12 +23,13 @@

/*
* @test
* @bug 8246774
* @summary Test for subtype stream field value assign-ability
* @library /test/lib
* @modules jdk.compiler
* @compile AssignableFrom.java Point.java
* DefaultValues.java SuperStreamFields.java AssignableFromTest.java
* @run testng/othervm AssignableFromTest
* DefaultValues.java SuperStreamFields.java
* @run testng AssignableFromTest
*/

import java.math.BigDecimal;
@@ -23,12 +23,12 @@

/*
* @test
* @bug 8246774
* @summary Checks that the appropriate default value is given to the canonical ctr
* @library /test/lib
* @modules jdk.compiler
* @compile AssignableFrom.java Point.java
* DefaultValues.java SuperStreamFields.java DefaultValuesTest.java
* @run testng/othervm DefaultValuesTest
* @compile AssignableFrom.java Point.java DefaultValues.java SuperStreamFields.java
* @run testng DefaultValuesTest
*/

import java.io.ByteArrayOutputStream;
@@ -23,12 +23,12 @@

/*
* @test
* @bug 8246774
* @summary superclass fields in the stream should be discarded
* @library /test/lib
* @modules jdk.compiler
* @compile AssignableFrom.java Point.java
* DefaultValues.java SuperStreamFields.java SuperStreamFieldsTest.java
* @run testng/othervm SuperStreamFieldsTest
* @compile AssignableFrom.java Point.java DefaultValues.java SuperStreamFields.java
* @run testng SuperStreamFieldsTest
*/

import org.testng.annotations.DataProvider;
@@ -23,6 +23,7 @@

/*
* @test
* @bug 8246774
* @summary Class redefinition must preclude changes to Record attributes
* @comment This is a copy of test/jdk/java/lang/instrument/RedefineNestmateAttr/
* @comment modified for records and the Record attribute.
@@ -34,7 +35,6 @@
* @compile ../NamedBuffer.java
* @run main RedefineClassHelper
* @compile Host/Host.java
* @compile TestRecordAttr.java
* @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+record=trace TestRecordAttr Host
* @compile HostA/Host.java
* @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+record=trace TestRecordAttr HostA
@@ -23,6 +23,7 @@

/*
* @test
* @bug 8246774
* @summary Class redefinition must preclude changes to Record attributes
* @comment This is a copy of test/jdk/java/lang/instrument/RedefineNestmateAttr/
* @comment modified for records and the Record attribute.
@@ -34,7 +35,6 @@
* @compile ../NamedBuffer.java
* @run main RedefineClassHelper
* @compile Host/Host.java
* @compile TestRecordAttrGenericSig.java
* @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+record=trace TestRecordAttrGenericSig Host
* @compile HostA/Host.java
* @run main/othervm -javaagent:redefineagent.jar -Xlog:redefine+class+record=trace TestRecordAttrGenericSig HostA
@@ -23,8 +23,9 @@

/*
* @test
* @bug 8246774
* @summary Basic tests for ObjectMethods
* @run testng/othervm ObjectMethodsTest
* @run testng ObjectMethodsTest
* @run testng/othervm/java.security.policy=empty.policy ObjectMethodsTest
*/

@@ -23,12 +23,11 @@

/*
* @test
* @bug 8236539
* @bug 8236539 8246774
* @summary Relative link tags in record javadoc don't resolve
* @library /tools/lib ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
* @build toolbox.ToolBox javadoc.tester.*
* @compile TestRecordLinks.java
* @run main TestRecordLinks
*/

@@ -23,12 +23,11 @@

/*
* @test
* @bug 8225055 8239804
* @bug 8225055 8239804 8246774
* @summary Record types
* @library /tools/lib ../../lib
* @modules jdk.javadoc/jdk.javadoc.internal.tool
* @build toolbox.ToolBox javadoc.tester.*
* @compile TestRecordTypes.java
* @run main TestRecordTypes
*/

@@ -23,7 +23,7 @@

/*
* @test
* @bug 6493690
* @bug 6493690 8246774
* @summary javadoc should have a javax.tools.Tool service provider
* @modules java.compiler
* jdk.compiler
@@ -23,7 +23,7 @@

/*
* @test
* @bug 8149524 8131024 8165211 8080071 8130454 8167343 8129559 8114842 8182268 8223782 8235474
* @bug 8149524 8131024 8165211 8080071 8130454 8167343 8129559 8114842 8182268 8223782 8235474 8246774
* @summary Test SourceCodeAnalysis
* @build KullaTesting TestingInputStream
* @run testng CompletenessTest
@@ -23,7 +23,7 @@

/*
* @test
* @bug 8235474 8236715
* @bug 8235474 8236715 8246774
* @summary Tests for evalution of records
* @modules jdk.jshell
* @build KullaTesting TestingInputStream ExpectedDiagnostic
@@ -23,14 +23,14 @@

/*
* @test
* @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 8174041 8173916 8174028 8174262 8174797 8177079 8180508 8177466 8172154 8192979 8191842 8198573 8198801 8210596 8210959 8215099 8199623 8236715 8239536 8247456
* @bug 8153716 8143955 8151754 8150382 8153920 8156910 8131024 8160089 8153897 8167128 8154513 8170015 8170368 8172102 8172103 8165405 8173073 8173848 8174041 8173916 8174028 8174262 8174797 8177079 8180508 8177466 8172154 8192979 8191842 8198573 8198801 8210596 8210959 8215099 8199623 8236715 8239536 8247456 8246774
* @summary Simple jshell tool tests
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.main
* jdk.jdeps/com.sun.tools.javap
* jdk.jshell/jdk.internal.jshell.tool
* @build KullaTesting TestingInputStream
* @run testng/othervm ToolSimpleTest
* @run testng ToolSimpleTest
*/

import java.util.ArrayList;
ProTip! Use n and p to navigate between commits in a pull request.