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.

To download the current JDK release, click here.
JDK 16
16 b28Fixed
Related Reports
Relates :  
Relates :  
Description
Use of range-based for loops should be added to the permitted features list.

https://en.cppreference.com/w/cpp/language/range-for

Comments
Changeset: 52ab7212 Author: Kim Barrett <kbarrett@openjdk.org> Date: 2020-12-08 09:25:42 +0000 URL: https://git.openjdk.java.net/jdk/commit/52ab7212
08-12-2020

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.
26-11-2020