[ 
https://issues.apache.org/jira/browse/WICKET-1079?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Heider updated WICKET-1079:
-----------------------------------

    Description: 
When I turn on Wicket DEBUG LoadableDetachableModel.toString gets called.  My 
object descending from this class does not define it, so this code crashes:

        public String toString()
        {
                StringBuffer sb = new StringBuffer(super.toString());
                
sb.append(":attached=").append(attached).append(":tempModelObject=[").append(
                                this.transientModelObject).append("]");
                return sb.toString();
        }

super.toString is not defined, so it calls itself.

Obvious workaround is to define toString in the object, but took some time to 
figure out.


  was:
When I turn on Wicket DEBUG LoadableDetachableModel gets called.  My object 
descending from this class does not define it, so this code crashes:

        public String toString()
        {
                StringBuffer sb = new StringBuffer(super.toString());
                
sb.append(":attached=").append(attached).append(":tempModelObject=[").append(
                                this.transientModelObject).append("]");
                return sb.toString();
        }

super.toString is not defined, so it calls itself.

Obvious workaround is to define toString in the object, but took some time to 
figure out.



> LoadableDetachableMode.toString calls super.toString which will result in 
> stack overflow
> ----------------------------------------------------------------------------------------
>
>                 Key: WICKET-1079
>                 URL: https://issues.apache.org/jira/browse/WICKET-1079
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta4
>         Environment: Windows/JDK 6
>            Reporter: Timothy Heider
>            Priority: Minor
>
> When I turn on Wicket DEBUG LoadableDetachableModel.toString gets called.  My 
> object descending from this class does not define it, so this code crashes:
>       public String toString()
>       {
>               StringBuffer sb = new StringBuffer(super.toString());
>               
> sb.append(":attached=").append(attached).append(":tempModelObject=[").append(
>                               this.transientModelObject).append("]");
>               return sb.toString();
>       }
> super.toString is not defined, so it calls itself.
> Obvious workaround is to define toString in the object, but took some time to 
> figure out.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to