[
https://issues.apache.org/jira/browse/OPENJPA-2958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110034#comment-18110034
]
ASF subversion and git services commented on OPENJPA-2958:
----------------------------------------------------------
Commit d95f20b58166480a17e0dd0a19f63181c11801e3 in openjpa's branch
refs/heads/OPENJPA-2958 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=d95f20b58 ]
[OPENJPA-2958] Make the unenhanced instance registry package private
Review feedback: 4.2.0 already removes public API, so keeping the field
public for compatibility was not worth it. Nothing outside ImplHelper reads
or writes it any more. Package private rather than private so that the unit
test, which lives in the same package, can still read a registration back;
there is no public read path for it, since toPersistenceCapable() rejects a
non manageable instance before it reaches the map.
> Direct access to ImplHelper._unenhancedInstanceMap
> --------------------------------------------------
>
> Key: OPENJPA-2958
> URL: https://issues.apache.org/jira/browse/OPENJPA-2958
> 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_r3683000504
> **(low)** Reaching into `ImplHelper._unenhancedInstanceMap` (a public mutable
> static field) directly is fragile - suggest a small
> `ImplHelper.registerUnenhancedInstance(obj, pc)` method instead of exposing
> the raw map.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)