[
https://issues.apache.org/jira/browse/OPENJPA-2972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18106222#comment-18106222
]
Maxim Solodovnik commented on OPENJPA-2972:
-------------------------------------------
Comment from [~cristof]:
This was intended behavior meant to allow support of different DBs.
> Ceiling mutates shared operator field in appendTo
> -------------------------------------------------
>
> Key: OPENJPA-2972
> URL: https://issues.apache.org/jira/browse/OPENJPA-2972
> Project: OpenJPA
> Issue Type: Sub-task
> Components: jpa
> Affects Versions: 4.2.0
> Reporter: Maxim Solodovnik
> Assignee: Romain Manni-Bucau
> Priority: Major
> Fix For: 4.2.0
>
>
> Discussion thread:
> https://github.com/apache/openjpa/pull/144#discussion_r3683003416
> **(low)** `appendTo` mutates the instance field `operator` before delegating
> to `super.appendTo` (same pattern in NaturalLogarithm.java:49). Compiled
> query plans are cached and shared, so this is a data race on shared state;
> passing the dictionary function down locally (e.g. an `appendTo(..., String
> operator)` overload in UnaryOp) would keep the Val immutable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)