changeset 57473:5943fc3f6ce1

8236695: java.lang.Record should be declared with an explicit constructor Reviewed-by: psandoz, chegar
author darcy
date Tue, 07 Jan 2020 09:17:51 -0800
parents b567c4b48777
children 078325484932
files src/java.base/share/classes/java/lang/Record.java
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/Record.java	Tue Jan 07 17:06:10 2020 +0100
+++ b/src/java.base/share/classes/java/lang/Record.java	Tue Jan 07 09:17:51 2020 -0800
@@ -91,6 +91,11 @@
                              essentialAPI=true)
 public abstract class Record {
     /**
+     * Constructor for record classes to call.
+     */
+    protected Record() {}
+
+    /**
      * Indicates whether some other object is "equal to" this one.  In addition
      * to the general contract of {@link Object#equals(Object)},
      * record classes must further participate in the invariant that when