Repository navigation
#1382 initialize componentType of array classes in constructor - #1739
Open
StefanGraeber wants to merge 1 commit into
Open
StefanGraeber wants to merge 1 commit into
StefanGraeber wants to merge 1 commit into
Conversation
Till now, JavaClass representing an array type returned true for isArray but empty for getComponentType between creating the JavaClass and completing it. This gap breaks the construction of annotated types as soon as any array type reference exists (inclduing synthetic $VALUES field in enum). To prepare AnnotatedArrayType, the componentType is now resolved before constructing the JavaClass. This is always possible because array classes are always stubs. Signed-off-by: Stefan Gräber <stefan.graeber@tngtech.com>
StefanGraeber
force-pushed
the
feature/1382_eager_array_component_type
branch
from
October 5, 2026 07:29
afd150d to
0d96175
Compare
schulzjo-tng
approved these changes
Oct 9, 2026
schulzjo-tng
left a comment
Contributor
There was a problem hiding this comment.
Looks good overall. Leaving it up to you if you want to add another test.
| } | ||
|
|
||
| @Test | ||
| public void finds_array_type_multi_dimensional_and_recursive() { |
Contributor
There was a problem hiding this comment.
While this test is good to have, it actually passes on the current main branch. Are you able to test the change in behaviour now, or does that require further features to be developed?
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Till now, JavaClass representing an array type returned true for isArray but empty for getComponentType between creating the JavaClass and completing it. This gap breaks the construction of annotated types as soon as any array type reference exists (inclduing synthetic $VALUES field in enum). To prepare AnnotatedArrayType, the componentType is now resolved before constructing the JavaClass. This is always possible because array classes are always stubs.