Duke Yin created ISIS-1435:
------------------------------

             Summary: Infitinite recursion in updating() callback if it 
modifies the object
                 Key: ISIS-1435
                 URL: https://issues.apache.org/jira/browse/ISIS-1435
             Project: Isis
          Issue Type: Bug
          Components: Archetype: SimpleApp, Core
    Affects Versions: 1.12.2
            Reporter: Duke Yin
            Assignee: Dan Haywood


I'm observing infinite recursion / stack overflow if a domain object has an 
updating() reserved method that updates the domain object.  This is related, if 
not identical, to ISIS-1004.

Steps to reproduce:

1.
Checkout the SimpleApp as described on 
https://isis.apache.org/guides/ugfun.html#_generating_the_app - 
{code}
mvn archetype:generate  \
    -D archetypeGroupId=org.apache.isis.archetype \
    -D archetypeArtifactId=simpleapp-archetype \
    -D archetypeVersion=1.12.2 \
    -D groupId=com.mycompany \
    -D artifactId=myapp \
    -D version=1.0-SNAPSHOT \
    -B
{code}

2.
Open the class:
{code}domainapp.dom.simple.SimpleObject{code}
and add the following code to the bottom:
{code}
public void updating() {
        System.out.println("updating()");
        // this.name += "-updating"; // modification directly to field
        this.setName(this.getName() + "-updating"); // modification via setter
    }
{code}

3.
Build as described on 
https://isis.apache.org/guides/ugfun.html#_building_the_app - 
{code}
cd myapp
mvn clean install
{code}

Result:
Stack overflow in 
{code}domainapp.integtests.tests.modules.simple.SimpleObjectIntegTest$UpdateName{code}



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

Reply via email to