Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiNTMzMDVi...
) / Bug (
https://hibernate.atlassian.net/browse/HSEARCH-4853?atlOrigin=eyJpIjoiNTM...
) HSEARCH-4853 (
https://hibernate.atlassian.net/browse/HSEARCH-4853?atlOrigin=eyJpIjoiNTM...
) On JDK 21-ea+21, projection constructor relying on cannical record constructor result in
all-null records (
https://hibernate.atlassian.net/browse/HSEARCH-4853?atlOrigin=eyJpIjoiNTM...
)
Issue Type: Bug Assignee: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: mapper-pojo-base Created: 11/May/2023 05:08 AM Fix Versions: 6.2-backlog
Priority: Major Reporter: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
It seems parameters of record canonical constructors are considired implicit (
Parameter#isImplicit returns true ) starting with JDK 21-ea+21, which causes this check (
https://github.com/hibernate/hibernate-search/blob/6c6a2c6f27b0087fdbd884...
) to incorrectly assume these constructor parameters are for the surrounding instance in
nested classes, leading to all parameters being set to null when projecting.
See also:
https://ci.hibernate.org/job/hibernate-search/job/main/666/
14:09:20,303 (main) DEBUG PojoSearchQueryElementRegistryBuilder:89 - HSEARCH700117:
Constructor projection for type
'org.hibernate.search.integrationtest.mapper.pojo.mapping.definition.ProjectionConstructorRecordIT$2MyProjection':
valueCreateHandle: MethodHandleValueCreateHandle[public
org.hibernate.search.integrationtest.mapper.pojo.mapping.definition.ProjectionConstructorRecordIT$2MyProjection(java.lang.String,java.lang.Integer)]
innerDefinitions:
- <null projection>
- <null projection>
(
https://hibernate.atlassian.net/browse/HSEARCH-4853#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-4853#add-comment?atlOrigin...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:84d3b45 )