[
https://issues.apache.org/jira/browse/OPENJPA-2987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106243#comment-18106243
]
ASF subversion and git services commented on OPENJPA-2987:
----------------------------------------------------------
Commit b5ee7623991b0c0cab65b06f406d4cc25f2ab057 in openjpa's branch
refs/heads/OPENJPA-2987 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=b5ee76239 ]
[OPENJPA-2987] Restore externalized-parameter assertions
The three "CanDetectExternalized..." tests had been reduced to
assertNotNull(getResultList()), which can never fail, after JPA 3.2 made
getResultList() return a mutable ArrayList copy instead of the internal
ResultList the assertions relied on.
Externalized-parameter detection is still in place (PreparedQueryImpl
excludes such queries from the prepared query cache), so the original
assertions are restored by executing the kernel query directly, which
still yields the ResultList carrying the QueryExpressions user object.
> Externalized-parameter tests reduced to no-op assertions
> --------------------------------------------------------
>
> Key: OPENJPA-2987
> URL: https://issues.apache.org/jira/browse/OPENJPA-2987
> 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_r3683006222
> **(high)** These three tests kept their names ("CanDetectExternalized...")
> but no longer detect anything: the `getExpressions()` helper was deleted and
> the `isUsingExternalizedParameter(...)` assertions were replaced by
> `assertNotNull(getResultList())`, which can never fail. Was
> externalized-parameter detection actually removed from the prepared-query
> cache, or can the original assertions be restored? As written the tests are
> no-ops.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)