JDK-8254733 : HotSpot Style Guide should permit using range-based for loops
Type:Enhancement
Component:hotspot
Sub-Component:other
Affected Version:16
Priority:P4
Status:Resolved
Resolution:Fixed
Submitted:2020-10-14
Updated:2020-12-17
Resolved:2020-12-08
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.
The range-based for loop feature is currently of limited utility, because HotSpot code mostly avoids using the Standard Library and existing HotSpot code provides relatively little support for the feature. (GrowableArray and EnumRange both provide begin and end methods returning iterators.) There's a chicken and egg problem with the latter; there's no reason to provide support for the feature if it can't be used. By permitting use of the feature we encourage adding support.