[ 
https://issues.apache.org/jira/browse/OPENJPA-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Solodovnik resolved OPENJPA-2975.
---------------------------------------
      Assignee: Richard Zowalla
    Resolution: Fixed

> 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
>            Assignee: Richard Zowalla
>            Priority: Major
>             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)

Reply via email to