You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Maxim Solodovnik (Jira)" <ji...@apache.org> on 2026/08/20 07:57:00 UTC
[jira] [Created] (OPENJPA-2975) treat() join overloads silently cast without narrowing
Maxim Solodovnik created OPENJPA-2975:
-----------------------------------------
Summary: treat() join overloads silently cast without narrowing
Key: OPENJPA-2975
URL: https://issues.apache.org/jira/browse/OPENJPA-2975
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_r3683004426
**(medium)** Only `treat(Root)` gets a real implementation (`RootImpl.TreatedRoot`); all the join overloads (lines 429-450) and `treat(Path)` (line 458) just cast and return the same object. That is a silent no-op: no type narrowing is applied, but instead of the previous explicit UnsupportedOperationException users now get wrong behavior with no diagnostic. Could the unsupported overloads keep throwing (or get a TreatedJoin analogous to TreatedRoot)?
--
This message was sent by Atlassian Jira
(v8.20.10#820010)