You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2016/09/09 20:21:20 UTC

[jira] [Commented] (WICKET-6241) CheckingObjectOutputStream should track the original instance, before writeReplace()

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

ASF subversion and git services commented on WICKET-6241:
---------------------------------------------------------

Commit 3798d0fc3f42c7d2b8b3e8f691d59cf2f4fb0c05 in wicket's branch refs/heads/wicket-7.x from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=3798d0f ]

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