JDK-8225058 : JVMS changes for Records (Preview)
  • Type: Sub-task
  • Component: specification
  • Sub-Component: vm
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-30
  • Updated: 2020-05-29
  • Resolved: 2019-12-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 14
14 b27Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
the current definition of the record attribute is:
```
Record_attribute {
    u2 attribute_name_index;
    u4 attribute_length;
    u2 components_count;
    record_component_info components[components_count];
}
```

where record_component_info is:
```
    record_component_info {
        u2 name_index;
        u2 descriptor_index;
        u2 attributes_count;
        attribute_info attributes[attributes_count];
    }
```

If the component has a generic signature that is different from the erased descriptor, it is placed in a Signature attribute on the component, similarly as we do for field_info at present.
Comments
the current definition of the record attribute is: ``` Record_attribute { u2 attribute_name_index; u4 attribute_length; u2 components_count; record_component_info components[components_count]; } ``` where record_component_info is: ``` record_component_info { u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; } ``` If the component has a generic signature that is different from the erased descriptor, it is placed in a Signature attribute on the component, similarly as we do for field_info at present.
10-04-2020

``` Record { u2 attribute_name_index; u4 attribute_length; u2 components_count; { u2 name_index; u2 descriptor_index; u2 signature_index; } components[components_count]; } ```
01-07-2019