[ 
https://issues.apache.org/jira/browse/OPENJPA-2975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18121379#comment-18121379
 ] 

ASF subversion and git services commented on OPENJPA-2975:
----------------------------------------------------------

Commit cf36da3e6af55fb1477013bda161e2da20bf53ad in openjpa's branch 
refs/heads/OPENJPA-2990 from Paulo Cristovão de Araújo Silva Filho
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=cf36da3e6 ]

Merge pull request #194 from apache/OPENJPA-2975

[OPENJPA-2975] Narrow criteria TREAT joins instead of casting silently

> 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
>            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