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

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

Commit def03addf20259d294db09b9b8a9ffa5b114565a in wicket's branch 
refs/heads/master from [~dashorst]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=def03ad ]

WICKET-5916 StackOverflowError in LoadableDetachableModel

This fixes a circular calling issue with LoadableDetachableModel where
getObject() is called from the context of a load(). By tracking the
state of the LoadableDetachableModel more closely, we can short-circuit
the call chain and break out of the infinite calling loop.

I've opted to use an enum instead of adding a new flag to keep the
amount of flags to a minimum and to keep the memory requirements
low (instead of 2 flags, just one enum is referenced). The external
public and protected interfaces are still the same, so I don't
expect any problems within user applications, unless they are
manipulating the attached flag using reflection.

Fixes WICKET-5916


> StackOverflowError when calling getObject() from load() in LDM
> --------------------------------------------------------------
>
>                 Key: WICKET-5916
>                 URL: https://issues.apache.org/jira/browse/WICKET-5916
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 7.0.0-M5
>            Reporter: Martijn Dashorst
>             Fix For: 7.0.0-M6
>
>
> The fix for WICKET-5772 caused an infinite loop when calling getObject() from 
> inside load() in LoadableDetachableModel. While of course unwise to do so and 
> nobody in their right mind would do so directly, such a cycle can be 
> triggered through a series of unrelated calls emanating from load().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to