JDK-8341483 : Clarify special case handling of Types.getArrayType
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Affected Version: 24
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-10-03
  • Updated: 2024-10-14
  • Resolved: 2024-10-04
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 24
24 b19Fixed
Related Reports
CSR :  
Relates :  
Description
Copied from the parent issue:

getArrayType

spec: IAE if an input TypeMirror is "not valid"

actual: allows creation of primitive arrays, UnionType arrays, and '<none>[]' (!); IAE for WildcardType, ExecutableType, and other NoTypes; no error for ErrorTypes.

expected: IAE for all inputs that are neither ReferenceType nor PrimitiveType (including IAE for UnionTypes and NONE). 
Comments
Changeset: a3e23572 Branch: master Author: Joe Darcy <darcy@openjdk.org> Date: 2024-10-04 20:31:28 +0000 URL: https://git.openjdk.org/jdk/commit/a3e23572d5e879bd1c3b1755cf7be4601d03b62e
04-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21346 Date: 2024-10-04 04:10:20 +0000
04-10-2024