Repository navigation
Keep resolved generic type hash codes consistent with JDK types - #3841
Merged
hazendaz merged 2 commits intoNov 1, 2026
Merged
Conversation
Align WildcardType and GenericArrayType hash codes with equal JDK reflection types.
Cover wildcard upper, lower and unbounded types and generic arrays against equal JDK reflection types.
hazendaz
approved these changes
Nov 1, 2026
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.
This follows up on the native
Typeinteroperability covered by #3512.WildcardTypeImplandGenericArrayTypeImplcompare equal to the corresponding JDK reflection types, but currently return different hash codes. This can miss an exactTypeHandlerRegistryregistration: a nativeList<String>[]registration is not found with the equal resolved type. For wildcardListtypes, a lookup can fall back to a conflicted raw-Listhandler when another specialization is registered.The change aligns the two hash-code implementations with their JDK counterparts, without changing equality or type resolution. The existing equality tests now check hash-code consistency too; wildcard coverage includes upper bounds, lower bounds, and unbounded wildcards.
Validation:
formatter:validate impsort:checkand the official Linux command./mvnw test --batch-mode --no-transfer-progress --show-version -Dlicense.skip=true -PtestContainers.bd5915a99761da58011922d4ce143f840a805cc3, applied the exact patch, and verified both patched source hashes again after the tests.The macOS/Windows matrix has not been run for this patch.