JDK-8280602 : 4.3.1: Avoid use of newInstance when it is terminally deprecated
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 17
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-01-25
  • Updated: 2022-01-25
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Example 4.3.1-1 uses reflection, specifically Class::newInstance, to demonstrate object creation:

(Point)Class.forName("Point").newInstance();

Reflection is too sophisticated to show so early in the JLS, and in any case newInstance has been ordinarily deprecated since 9. When newInstance is terminally deprecated, the example should replace reflection with a simple `new Point()` clause. The mention of newInstance in 11.2.3 should be clarified at the same time to refer to Constructor::newInstance.