Maxim Solodovnik created OPENJPA-2973:
-----------------------------------------
Summary: Converter instantiated reflectively, skips CDI and nulls
Key: OPENJPA-2973
URL: https://issues.apache.org/jira/browse/OPENJPA-2973
Project: OpenJPA
Issue Type: Sub-task
Components: jpa
Affects Versions: 4.2.0
Reporter: Maxim Solodovnik
Fix For: 4.2.0
Discussion thread:
https://github.com/apache/openjpa/pull/144#discussion_r3683003654
**(low)** Two questions: (1) the converter is instantiated via
`getDeclaredConstructor().newInstance()`, bypassing CDI-managed converters (JPA
allows converters as CDI beans with injection); (2) why reflection/`findMethod`
instead of casting to `jakarta.persistence.AttributeConverter` and calling it
directly? Note also the `val == null` short-circuits mean a converter mapping
null to a default value is never consulted for nulls.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)