[
https://issues.apache.org/jira/browse/WICKET-6241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15478143#comment-15478143
]
ASF subversion and git services commented on WICKET-6241:
---------------------------------------------------------
Commit 5ac20266773ec65038af18a57b625d6826b38380 in wicket's branch
refs/heads/master from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=5ac2026 ]
WICKET-6241 CheckingObjectOutputStream should track the original instance,
before writeReplace()
> CheckingObjectOutputStream should track the original instance, before
> writeReplace()
> ------------------------------------------------------------------------------------
>
> Key: WICKET-6241
> URL: https://issues.apache.org/jira/browse/WICKET-6241
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 8.0.0-M1, 7.4.0
> Reporter: Martin Grigorov
> Assignee: Martin Grigorov
> Fix For: 8.0.0-M2, 7.5.0
>
>
> The object passed for checking could be resolved by calling its
> #writeReplace() method at
> https://github.com/apache/wicket/blob/379f9e54359be17619be28b0b6303dc9ce3a8e81/wicket-core/src/main/java/org/apache/wicket/core/util/objects/checker/CheckingObjectOutputStream.java#L374.
> Later the the original instance should be put in the "checked" map because
> otherwise it might fail with StackoverflowError.
> I our case we have a JPA entity User that has a member field "modifiedBy".
> When this user is an admin it is possible that it modifies itself. So the
> original checked instance is a Javassist proxy, after #writeReplace() it is a
> plain object. Until now the plain object is "checked" and then when its
> fields are processed the "modifiedBy" is again the same Javassist proxy and
> the processing continues in loops.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)